#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 32 of file stream-transport.hpp.
typedef StreamTransportImpl<BaseTransport,Protocol> ndn::StreamTransportImpl< BaseTransport, Protocol >::Impl |
Definition at line 35 of file stream-transport.hpp.
typedef std::list<Block> ndn::StreamTransportImpl< BaseTransport, Protocol >::BlockSequence |
Definition at line 37 of file stream-transport.hpp.
typedef std::list<BlockSequence> ndn::StreamTransportImpl< BaseTransport, Protocol >::TransmissionQueue |
Definition at line 38 of file stream-transport.hpp.
|
inline |
Definition at line 40 of file stream-transport.hpp.
|
inline |
Definition at line 50 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 76 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 86 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 103 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 134 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 149 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 166 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 184 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 212 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 228 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 274 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 276 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 277 of file stream-transport.hpp.
Referenced by ndn::StreamTransportImpl< BaseTransport, Protocol >::handleAsyncReceive(), and ndn::StreamTransportImpl< BaseTransport, Protocol >::resume().
|
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 280 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 281 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 283 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().