Boost logo

Boost :

Subject: [boost] Boost.Asio asio::basic_socket_acceptor
From: Joshua Pedrick (joshua.pedrick_at_[hidden])
Date: 2009-03-09 17:02:38


I'm trying to write an application that can simply switch between
using local stream sockets and tcp stream sockets. I successfully
implemented this behavior with BSD sockets in Linux, but
it seems the class hierarchy in boost::asio makes this behavior
awkward, since asio::basic_socket_acceptor template requires a
protocol type, but there is so base class for protocols. I'm wondering
if there is a reason for this or if it could possibly be changed?

Basically, I have a client/server library for distributed processing,
which in some cases, I wish to run using local sockets and other times
run using TCP sockets. I was hoping Boost Asio could make the solution
a little more elegant/clean, but at the moment I can't find an elegant
manner to do this.

I'd be glad to do all the work for this, provided some guidance, but I
basically don't want to build my application on a custom version of
boost::asio, which won't improve with the main version. So if this
can't be changed, I just won't use asio, but if it can, I'll go ahead
and take the time to implement the changes


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk