boost.png (6897 bytes)

PrevUpHomeNext

Class template connection_impl<Demultiplexer, asynch_synchronisation, SocketErrorPolicy, ConnectionHandler>

boost::net::socket::connection_impl<Demultiplexer, asynch_synchronisation, SocketErrorPolicy, ConnectionHandler> —

Synopsis

template<typename Demultiplexer, typename SocketErrorPolicy, 
         typename ConnectionHandler> 
class connection_impl<Demultiplexer, asynch_synchronisation, SocketErrorPolicy, ConnectionHandler> : public boost::net::socket::impl::connection_handled< ConnectionHandler >
{
public:
  // types
  typedef Demultiplexer                                                               demultiplexer_type;  
  typedef asynch_synchronisation                                                      synchronisation_type;
  typedef SocketErrorPolicy                                                           error_policy;        
  typedef ConnectionHandler                                                           connection_handler_t;
  typedef socket                                                                      socket_base_t;       
  typedef socket_base_t::socket_t                                                     socket_t;            
  typedef demux::arguments< Demultiplexer, iomechanism::socket_tag, reader_role_tag > read_arguments_type; 
  typedef demux::arguments< Demultiplexer, iomechanism::socket_tag, reader_role_tag > write_arguments_type;

  // construct/copy/destruct
  connection_impl& operator=(const connection_impl &);

  // public member functions
   connection_impl(socket_base_t &, Demultiplexer &) ;
   connection_impl(connection_impl &) ;
   ~connection_impl() ;
  int recv(void *, int, int = 0) ;
  int send(const void *, int, int = 0) ;
  void notification(demux::notification_mode) ;
  connection_error close() ;

  // private member functions
  connection_error lost() ;
  void read_complete() ;
  void write_complete() ;
  void handle_error(function::name, socket_errno) ;
};

Description

connection_impl construct/copy/destruct

  1. connection_impl& operator=(const connection_impl & );

connection_impl public member functions

  1.  connection_impl(socket_base_t & s, Demultiplexer & demux) ;
  2.  connection_impl(connection_impl & s) ;
  3.  ~connection_impl() ;
  4. int recv(void * data, int len, int  = 0) ;
  5. int send(const void * data, int len, int  = 0) ;

    Returns the number of bytes sent

  6. void notification(demux::notification_mode mode) ;
  7. connection_error close() ;

connection_impl private member functions

  1. connection_error lost() ;
  2. void read_complete() ;
  3. void write_complete() ;
  4. void handle_error(function::name fn, socket_errno err) ;
Copyright © 2004 Hugo Duncan

PrevUpHomeNext