All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
ndn::StreamTransportImpl< BaseTransport, Protocol > Class Template Reference

#include <stream-transport.hpp>

Inheritance diagram for ndn::StreamTransportImpl< BaseTransport, Protocol >:
[legend]
Collaboration diagram for ndn::StreamTransportImpl< BaseTransport, Protocol >:
[legend]

Public Types

typedef BaseTransport base_transport
 
typedef Protocol protocol
 
typedef StreamTransportImpl
< BaseTransport, Protocol > 
impl
 

Public Member Functions

 StreamTransportImpl (base_transport &transport, boost::asio::io_service &ioService)
 
void connectHandler (const boost::system::error_code &error)
 
void connectTimeoutHandler (const boost::system::error_code &error)
 
void connect (const typename protocol::endpoint &endpoint)
 
void close ()
 
void pause ()
 
void resume ()
 
void send (const Block &wire)
 
void send (const Block &header, const Block &payload)
 
bool processAll (uint8_t *buffer, size_t &offset, size_t availableSize)
 
void handle_async_receive (const boost::system::error_code &error, std::size_t bytes_recvd)
 
void handle_async_send (const boost::system::error_code &error, const Block &wire)
 
void handle_async_send (const boost::system::error_code &error, const Block &header, const Block &payload)
 

Protected Attributes

base_transportm_transport
 
protocol::socket m_socket
 
uint8_t m_inputBuffer [MAX_LENGTH]
 
size_t m_inputBufferSize
 
std::list< Blockm_sendQueue
 
std::list< std::pair< Block,
Block > > 
m_sendPairQueue
 
bool m_connectionInProgress
 
boost::asio::deadline_timer m_connectTimer
 

Detailed Description

template<class BaseTransport, class Protocol>
class ndn::StreamTransportImpl< BaseTransport, Protocol >

Definition at line 17 of file stream-transport.hpp.

Member Typedef Documentation

template<class BaseTransport , class Protocol >
typedef BaseTransport ndn::StreamTransportImpl< BaseTransport, Protocol >::base_transport

Definition at line 20 of file stream-transport.hpp.

template<class BaseTransport , class Protocol >
typedef StreamTransportImpl<BaseTransport,Protocol> ndn::StreamTransportImpl< BaseTransport, Protocol >::impl

Definition at line 22 of file stream-transport.hpp.

template<class BaseTransport , class Protocol >
typedef Protocol ndn::StreamTransportImpl< BaseTransport, Protocol >::protocol

Definition at line 21 of file stream-transport.hpp.

Constructor & Destructor Documentation

template<class BaseTransport , class Protocol >
ndn::StreamTransportImpl< BaseTransport, Protocol >::StreamTransportImpl ( base_transport transport,
boost::asio::io_service &  ioService 
)
inline

Definition at line 24 of file stream-transport.hpp.

Member Function Documentation

template<class BaseTransport , class Protocol >
void ndn::StreamTransportImpl< BaseTransport, Protocol >::close ( )
inline

Definition at line 102 of file stream-transport.hpp.

template<class BaseTransport , class Protocol >
void ndn::StreamTransportImpl< BaseTransport, Protocol >::connect ( const typename protocol::endpoint &  endpoint)
inline
Todo:
Decide whether this number should be configurable

Definition at line 85 of file stream-transport.hpp.

template<class BaseTransport , class Protocol >
void ndn::StreamTransportImpl< BaseTransport, Protocol >::connectHandler ( const boost::system::error_code &  error)
inline

Definition at line 34 of file stream-transport.hpp.

template<class BaseTransport , class Protocol >
void ndn::StreamTransportImpl< BaseTransport, Protocol >::connectTimeoutHandler ( const boost::system::error_code &  error)
inline

Definition at line 72 of file stream-transport.hpp.

template<class BaseTransport , class Protocol >
void ndn::StreamTransportImpl< BaseTransport, Protocol >::handle_async_receive ( const boost::system::error_code &  error,
std::size_t  bytes_recvd 
)
inline

Definition at line 180 of file stream-transport.hpp.

template<class BaseTransport , class Protocol >
void ndn::StreamTransportImpl< BaseTransport, Protocol >::handle_async_send ( const boost::system::error_code &  error,
const Block wire 
)
inline

Definition at line 229 of file stream-transport.hpp.

template<class BaseTransport , class Protocol >
void ndn::StreamTransportImpl< BaseTransport, Protocol >::handle_async_send ( const boost::system::error_code &  error,
const Block header,
const Block payload 
)
inline

Definition at line 235 of file stream-transport.hpp.

template<class BaseTransport , class Protocol >
void ndn::StreamTransportImpl< BaseTransport, Protocol >::pause ( )
inline

Definition at line 113 of file stream-transport.hpp.

template<class BaseTransport , class Protocol >
bool ndn::StreamTransportImpl< BaseTransport, Protocol >::processAll ( uint8_t *  buffer,
size_t &  offset,
size_t  availableSize 
)
inline

Definition at line 164 of file stream-transport.hpp.

template<class BaseTransport , class Protocol >
void ndn::StreamTransportImpl< BaseTransport, Protocol >::resume ( )
inline

Definition at line 123 of file stream-transport.hpp.

template<class BaseTransport , class Protocol >
void ndn::StreamTransportImpl< BaseTransport, Protocol >::send ( const Block wire)
inline

Definition at line 135 of file stream-transport.hpp.

template<class BaseTransport , class Protocol >
void ndn::StreamTransportImpl< BaseTransport, Protocol >::send ( const Block header,
const Block payload 
)
inline

Definition at line 145 of file stream-transport.hpp.

Field Documentation

template<class BaseTransport , class Protocol >
bool ndn::StreamTransportImpl< BaseTransport, Protocol >::m_connectionInProgress
protected

Definition at line 250 of file stream-transport.hpp.

template<class BaseTransport , class Protocol >
boost::asio::deadline_timer ndn::StreamTransportImpl< BaseTransport, Protocol >::m_connectTimer
protected

Definition at line 252 of file stream-transport.hpp.

template<class BaseTransport , class Protocol >
uint8_t ndn::StreamTransportImpl< BaseTransport, Protocol >::m_inputBuffer[MAX_LENGTH]
protected

Definition at line 245 of file stream-transport.hpp.

template<class BaseTransport , class Protocol >
size_t ndn::StreamTransportImpl< BaseTransport, Protocol >::m_inputBufferSize
protected

Definition at line 246 of file stream-transport.hpp.

template<class BaseTransport , class Protocol >
std::list< std::pair<Block, Block> > ndn::StreamTransportImpl< BaseTransport, Protocol >::m_sendPairQueue
protected

Definition at line 249 of file stream-transport.hpp.

template<class BaseTransport , class Protocol >
std::list< Block > ndn::StreamTransportImpl< BaseTransport, Protocol >::m_sendQueue
protected

Definition at line 248 of file stream-transport.hpp.

template<class BaseTransport , class Protocol >
protocol::socket ndn::StreamTransportImpl< BaseTransport, Protocol >::m_socket
protected

Definition at line 244 of file stream-transport.hpp.

template<class BaseTransport , class Protocol >
base_transport& ndn::StreamTransportImpl< BaseTransport, Protocol >::m_transport
protected

Definition at line 242 of file stream-transport.hpp.