boost.png (6897 bytes)

PrevUpHomeNext

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

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

Synopsis

template<typename Demultiplexer, typename SocketErrorPolicy, 
         typename ConnectionHandler> 
class connection_impl<Demultiplexer, non_blocking_synchronisation, SocketErrorPolicy, ConnectionHandler> : public boost::net::socket::impl::connection_handled< ConnectionHandler >
{
public:
  // types
  typedef Demultiplexer                                                               demultiplexer_type;  
  typedef non_blocking_synchronisation                                                synchronisation_type;
  typedef SocketErrorPolicy                                                           error_policy;        
  typedef ConnectionHandler                                                           connection_handler_t;
  typedef socket                                                                      ipc_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, writer_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) ;
  void can_read() ;
  int send(const void *, int, int = 0) ;
  void can_write() ;
  connection_error close() ;

  // private member functions
  void lost() ;
  socket_errno force_close() ;
  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 flags = 0) ;
  5. void can_read() ;
  6. int send(const void * data, int len, int flags = 0) ;

    Returns the number of bytes sent

  7. void can_write() ;
  8. connection_error close() ;

connection_impl private member functions

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

PrevUpHomeNext