[Home]BoostSocket/AsynchSocketBase

BOOST WIKI | BoostSocket | RecentChanges | Preferences | Page List | Links List

AsynchSocketBase concept

Try to describe a socket_base class for platform neutral asynchrounous socket operations:

The AsynchSocketBase is a refinement of the SocketBaseConcept, adding these signatures:

 template <class Addr> void async_accept(
      AsynchSocketBase& socket,
      Addr& address, 
      boost::function<void(AsynchSocketBase&,SocketError?> completionRoutine);

 template <class Addr> void async_connect(
     const Addr& address,
     boost::function<void(AsynchSocketBase&,SocketError?> completionRoutine);

 void async_recv(
     void* data, int len, 
     boost::function<void(AsynchSocketBase&,SocketError?,unsigned  int)> completionRoutine);

 void async_send(
    const void* data, int len, b
    boost::function<void(AsynchSocketBase&,SocketError?,unsigned int)> completionRoutine);

 void async_close(
    boost::function<void(AsynchSocketBase&, SocketError?)> completionRoutine);

To receive callbacks and completions the AsynchSocketBase has to attach to an AsynchProactor the completions will be dequed and dispatched by the dispatch method of the AsynchProactor.

Should we provide and support, async_connect, async_accept (are these easily and efficiently implementable in Unix/Linux? MacOS? and Windows and which versions).

Questions


BOOST WIKI | BoostSocket | RecentChanges | Preferences | Page List | Links List
Edit text of this page | View other revisions
Last edited December 18, 2004 12:30 pm (diff)
Search:
Disclaimer: This site not officially maintained by Boost Developers