Bytemaster's Boost Libraries
Public Types | Public Member Functions
boost::cmt::asio::acceptor Class Reference

Accepts new tcp sockets. More...

#include <acceptor.hpp>

List of all members.

Public Types

typedef boost::shared_ptr
< acceptor
ptr
typedef boost::function< void(const
tcp_socket_ptr,
boost::system::error_code)> 
handler

Public Member Functions

void listen (uint16_t port, const handler &on_con)

Detailed Description

Accepts new tcp sockets.

Provides a means to async listen for new tcp connections. The specified callback handler will be called any time a new connection arrives.

Unlike the boost::asio::tcp::acceptor, on_new_connection will be called in the current thread as a new 'fiber'.

        acceptor acc;
        acc.listen( 8000, on_new_connection );

The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Defines