Eris  1.4.0
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
Eris::AsioStreamSocket< ProtocolT > Class Template Reference

Template specialization which uses boost::asio sockets. More...

#include <StreamSocket.h>

Inheritance diagram for Eris::AsioStreamSocket< ProtocolT >:
Eris::StreamSocket Eris::ResolvableAsioStreamSocket< ProtocolT >

Public Member Functions

 AsioStreamSocket (boost::asio::io_service &io_service, const std::string &client_name, Atlas::Bridge &bridge, StreamSocket::Callbacks &callbacks)
 
void connect (const typename ProtocolT::endpoint &endpoint)
 
virtual void write ()
 Send any unsent data.
 
ProtocolT::socket & getAsioSocket ()
 
- Public Member Functions inherited from Eris::StreamSocket
 StreamSocket (boost::asio::io_service &io_service, const std::string &client_name, Atlas::Bridge &bridge, Callbacks &callbacks)
 
void detach ()
 Detaches the callbacks. More...
 
Atlas::Codec & getCodec ()
 Gets the codec object. More...
 
Atlas::Objects::ObjectsEncoder & getEncoder ()
 Gets the encoder object. More...
 

Protected Member Functions

virtual void negotiate_read ()
 
void negotiate_write ()
 
virtual void do_read ()
 
- Protected Member Functions inherited from Eris::StreamSocket
void startNegotiation ()
 
Atlas::Negotiate::State negotiate ()
 

Protected Attributes

ProtocolT::socket m_socket
 
- Protected Attributes inherited from Eris::StreamSocket
boost::asio::io_service & m_io_service
 
Atlas::Bridge & _bridge
 
Callbacks _callbacks
 
boost::asio::streambuf * mWriteBuffer
 Buffer used to write data to be sent. More...
 
boost::asio::streambuf * mSendBuffer
 Buffer of data which is being sent. More...
 
boost::asio::streambuf mReadBuffer
 Buffer for data being read from the socket.
 
std::istream mInStream
 Stream for data being received.
 
std::ostream mOutStream
 Stream for data being sent out.
 
bool mShouldSend
 True if we should send again as soon as an ongoing async_write operation completes.
 
bool mIsSending
 True if we're currently sending through an async_write (and thus shouldn't touch mSendBuffer).
 
Atlas::Net::StreamConnect * _sc
 negotiation object (NULL after connection!)
 
boost::asio::deadline_timer _negotiateTimer
 
boost::asio::deadline_timer _connectTimer
 
Atlas::Codec * m_codec
 
Atlas::Objects::ObjectsEncoder * m_encoder
 
bool m_is_connected
 

Additional Inherited Members

- Public Types inherited from Eris::StreamSocket
enum  Status {
  INVALID_STATUS = 0, CONNECTING, CONNECTING_TIMEOUT, CONNECTING_FAILED,
  NEGOTIATE, NEGOTIATE_TIMEOUT, NEGOTIATE_FAILED, CONNECTED,
  CONNECTION_FAILED, DISCONNECTED, DISCONNECTING
}
 
- Protected Types inherited from Eris::StreamSocket
enum  { read_buffer_size = 2048 }
 

Detailed Description

template<typename ProtocolT>
class Eris::AsioStreamSocket< ProtocolT >

Template specialization which uses boost::asio sockets.


The documentation for this class was generated from the following files: