#include <stream-transport.hpp>
Public Types | |
typedef StreamTransportImpl< BaseTransport, Protocol > | Impl |
typedef std::list< Block > | BlockSequence |
typedef std::list< BlockSequence > | TransmissionQueue |
Public Member Functions | |
StreamTransportImpl (BaseTransport &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) |
void | handleAsyncWrite (const boost::system::error_code &error, TransmissionQueue::iterator queueItem) |
bool | processAll (uint8_t *buffer, size_t &offset, size_t nBytesAvailable) |
void | handleAsyncReceive (const boost::system::error_code &error, std::size_t nBytesRecvd) |
Protected Attributes | |
BaseTransport & | m_transport |
Protocol::socket | m_socket |
uint8_t | m_inputBuffer [MAX_NDN_PACKET_SIZE] |
size_t | m_inputBufferSize |
TransmissionQueue | m_transmissionQueue |
bool | m_connectionInProgress |
boost::asio::deadline_timer | m_connectTimer |
Definition at line 33 of file stream-transport.hpp.
typedef StreamTransportImpl<BaseTransport,Protocol> ndn::StreamTransportImpl< BaseTransport, Protocol >::Impl |
Definition at line 36 of file stream-transport.hpp.
typedef std::list<Block> ndn::StreamTransportImpl< BaseTransport, Protocol >::BlockSequence |
Definition at line 38 of file stream-transport.hpp.
typedef std::list<BlockSequence> ndn::StreamTransportImpl< BaseTransport, Protocol >::TransmissionQueue |
Definition at line 39 of file stream-transport.hpp.
|
inline |
Definition at line 41 of file stream-transport.hpp.
|
inline |
Definition at line 51 of file stream-transport.hpp.
References ndn::StreamTransportImpl< BaseTransport, Protocol >::handleAsyncWrite(), ndn::StreamTransportImpl< BaseTransport, Protocol >::m_connectionInProgress, ndn::StreamTransportImpl< BaseTransport, Protocol >::m_connectTimer, ndn::StreamTransportImpl< BaseTransport, Protocol >::m_socket, ndn::StreamTransportImpl< BaseTransport, Protocol >::m_transmissionQueue, ndn::StreamTransportImpl< BaseTransport, Protocol >::m_transport, and ndn::StreamTransportImpl< BaseTransport, Protocol >::resume().
Referenced by ndn::StreamTransportImpl< BaseTransport, Protocol >::connect(), and ndn::StreamTransportWithResolverImpl< BaseTransport, Protocol >::resolveHandler().
|
inline |
Definition at line 77 of file stream-transport.hpp.
References ndn::StreamTransportImpl< BaseTransport, Protocol >::m_transport.
Referenced by ndn::StreamTransportImpl< BaseTransport, Protocol >::connect(), and ndn::StreamTransportWithResolverImpl< BaseTransport, Protocol >::connect().
|
inline |
Definition at line 87 of file stream-transport.hpp.
References ndn::StreamTransportImpl< BaseTransport, Protocol >::connectHandler(), ndn::StreamTransportImpl< BaseTransport, Protocol >::connectTimeoutHandler(), ndn::StreamTransportImpl< BaseTransport, Protocol >::m_connectionInProgress, ndn::StreamTransportImpl< BaseTransport, Protocol >::m_connectTimer, and ndn::StreamTransportImpl< BaseTransport, Protocol >::m_socket.
|
inline |
Definition at line 104 of file stream-transport.hpp.
References ndn::StreamTransportImpl< BaseTransport, Protocol >::m_connectionInProgress, ndn::StreamTransportImpl< BaseTransport, Protocol >::m_connectTimer, ndn::StreamTransportImpl< BaseTransport, Protocol >::m_socket, ndn::StreamTransportImpl< BaseTransport, Protocol >::m_transmissionQueue, and ndn::StreamTransportImpl< BaseTransport, Protocol >::m_transport.
|
inline |
|
inline |
Definition at line 135 of file stream-transport.hpp.
References ndn::StreamTransportImpl< BaseTransport, Protocol >::handleAsyncReceive(), ndn::StreamTransportImpl< BaseTransport, Protocol >::m_connectionInProgress, ndn::StreamTransportImpl< BaseTransport, Protocol >::m_inputBuffer, ndn::StreamTransportImpl< BaseTransport, Protocol >::m_inputBufferSize, ndn::StreamTransportImpl< BaseTransport, Protocol >::m_socket, ndn::StreamTransportImpl< BaseTransport, Protocol >::m_transport, and ndn::MAX_NDN_PACKET_SIZE.
Referenced by ndn::StreamTransportImpl< BaseTransport, Protocol >::connectHandler().
|
inline |
Definition at line 150 of file stream-transport.hpp.
References ndn::StreamTransportImpl< BaseTransport, Protocol >::handleAsyncWrite(), ndn::StreamTransportImpl< BaseTransport, Protocol >::m_socket, ndn::StreamTransportImpl< BaseTransport, Protocol >::m_transmissionQueue, and ndn::StreamTransportImpl< BaseTransport, Protocol >::m_transport.
|
inline |
Definition at line 167 of file stream-transport.hpp.
References ndn::StreamTransportImpl< BaseTransport, Protocol >::handleAsyncWrite(), ndn::StreamTransportImpl< BaseTransport, Protocol >::m_socket, ndn::StreamTransportImpl< BaseTransport, Protocol >::m_transmissionQueue, and ndn::StreamTransportImpl< BaseTransport, Protocol >::m_transport.
|
inline |
Definition at line 185 of file stream-transport.hpp.
References ndn::StreamTransportImpl< BaseTransport, Protocol >::m_socket, ndn::StreamTransportImpl< BaseTransport, Protocol >::m_transmissionQueue, and ndn::StreamTransportImpl< BaseTransport, Protocol >::m_transport.
Referenced by ndn::StreamTransportImpl< BaseTransport, Protocol >::connectHandler(), and ndn::StreamTransportImpl< BaseTransport, Protocol >::send().
|
inline |
Definition at line 213 of file stream-transport.hpp.
References ndn::Block::fromBuffer(), ndn::StreamTransportImpl< BaseTransport, Protocol >::m_transport, and ndn::Block::size().
Referenced by ndn::StreamTransportImpl< BaseTransport, Protocol >::handleAsyncReceive().
|
inline |
Definition at line 229 of file stream-transport.hpp.
References ndn::StreamTransportImpl< BaseTransport, Protocol >::m_inputBuffer, ndn::StreamTransportImpl< BaseTransport, Protocol >::m_inputBufferSize, ndn::StreamTransportImpl< BaseTransport, Protocol >::m_socket, ndn::StreamTransportImpl< BaseTransport, Protocol >::m_transport, ndn::MAX_NDN_PACKET_SIZE, and ndn::StreamTransportImpl< BaseTransport, Protocol >::processAll().
Referenced by ndn::StreamTransportImpl< BaseTransport, Protocol >::resume().
|
protected |
Definition at line 275 of file stream-transport.hpp.
Referenced by ndn::StreamTransportImpl< BaseTransport, Protocol >::close(), ndn::StreamTransportImpl< BaseTransport, Protocol >::connectHandler(), ndn::StreamTransportImpl< BaseTransport, Protocol >::connectTimeoutHandler(), ndn::StreamTransportImpl< BaseTransport, Protocol >::handleAsyncReceive(), ndn::StreamTransportImpl< BaseTransport, Protocol >::handleAsyncWrite(), ndn::StreamTransportImpl< BaseTransport, Protocol >::pause(), ndn::StreamTransportImpl< BaseTransport, Protocol >::processAll(), ndn::StreamTransportWithResolverImpl< BaseTransport, Protocol >::resolveHandler(), ndn::StreamTransportImpl< BaseTransport, Protocol >::resume(), and ndn::StreamTransportImpl< BaseTransport, Protocol >::send().
|
protected |
Definition at line 277 of file stream-transport.hpp.
Referenced by ndn::StreamTransportImpl< BaseTransport, Protocol >::close(), ndn::StreamTransportImpl< BaseTransport, Protocol >::connect(), ndn::StreamTransportWithResolverImpl< BaseTransport, Protocol >::connect(), ndn::StreamTransportImpl< BaseTransport, Protocol >::connectHandler(), ndn::StreamTransportImpl< BaseTransport, Protocol >::handleAsyncReceive(), ndn::StreamTransportImpl< BaseTransport, Protocol >::handleAsyncWrite(), ndn::StreamTransportImpl< BaseTransport, Protocol >::pause(), ndn::StreamTransportWithResolverImpl< BaseTransport, Protocol >::resolveHandler(), ndn::StreamTransportImpl< BaseTransport, Protocol >::resume(), and ndn::StreamTransportImpl< BaseTransport, Protocol >::send().
|
protected |
Definition at line 278 of file stream-transport.hpp.
Referenced by ndn::StreamTransportImpl< BaseTransport, Protocol >::handleAsyncReceive(), and ndn::StreamTransportImpl< BaseTransport, Protocol >::resume().
|
protected |
Definition at line 279 of file stream-transport.hpp.
Referenced by ndn::StreamTransportImpl< BaseTransport, Protocol >::handleAsyncReceive(), and ndn::StreamTransportImpl< BaseTransport, Protocol >::resume().
|
protected |
Definition at line 281 of file stream-transport.hpp.
Referenced by ndn::StreamTransportImpl< BaseTransport, Protocol >::close(), ndn::StreamTransportImpl< BaseTransport, Protocol >::connectHandler(), ndn::StreamTransportImpl< BaseTransport, Protocol >::handleAsyncWrite(), and ndn::StreamTransportImpl< BaseTransport, Protocol >::send().
|
protected |
Definition at line 282 of file stream-transport.hpp.
Referenced by ndn::StreamTransportImpl< BaseTransport, Protocol >::close(), ndn::StreamTransportImpl< BaseTransport, Protocol >::connect(), ndn::StreamTransportWithResolverImpl< BaseTransport, Protocol >::connect(), ndn::StreamTransportImpl< BaseTransport, Protocol >::connectHandler(), ndn::StreamTransportImpl< BaseTransport, Protocol >::pause(), and ndn::StreamTransportImpl< BaseTransport, Protocol >::resume().
|
protected |
Definition at line 284 of file stream-transport.hpp.
Referenced by ndn::StreamTransportImpl< BaseTransport, Protocol >::close(), ndn::StreamTransportImpl< BaseTransport, Protocol >::connect(), ndn::StreamTransportWithResolverImpl< BaseTransport, Protocol >::connect(), and ndn::StreamTransportImpl< BaseTransport, Protocol >::connectHandler().