Transport protocol to transfer an IPbus buffer via TCP. More...
#include <uhal/ProtocolTCP.hpp>
Public Member Functions | |
| TCP (const std::string &aId, const URI &aUri) | |
| Constructor. More... | |
| virtual | ~TCP () |
| Destructor. More... | |
Private Types | |
| typedef boost::chrono::steady_clock | SteadyClock_t |
Private Member Functions | |
| TCP (const TCP &aTCP) | |
| Copy Constructor This creates a new socket, dispatch queue, dispatch thread, etc. More... | |
| TCP & | operator= (const TCP &aTCP) |
| Assignment operator This reassigns the endpoint, closes the existing socket and cleans up the buffers, etc. More... | |
| void | implementDispatch (boost::shared_ptr< Buffers > aBuffers) |
| Send the IPbus buffer to the target, read back the response and call the packing-protocol's validate function. More... | |
| virtual void | Flush () |
| Concrete implementation of the synchronization function to block until all buffers have been sent, all replies received and all data validated. More... | |
| virtual void | dispatchExceptionHandler () |
| Function which tidies up this protocol layer in the event of an exception. More... | |
| uint32_t | getMaxSendSize () |
| Return the maximum size to be sent based on the buffer size in the target. More... | |
| uint32_t | getMaxReplySize () |
| Return the maximum size of reply packet based on the buffer size in the target. More... | |
| void | connect () |
| Make the TCP connection. More... | |
| void | write () |
| Initialize performing the next TCP write operation In multi-threaded mode, this runs the ASIO async write and exits In single-threaded mode, this runs the ASIO async write and blocks. More... | |
| void | write_callback (const boost::system::error_code &aErrorCode, std::size_t aBytesTransferred) |
| Callback function which is called upon completion of the ASIO async write This, then, makes a call to read to read back the reply to what has just been sent. More... | |
| void | read () |
| Initialize performing the next TCP read operation In multi-threaded mode, this runs the ASIO async read and exits In single-threaded mode, this runs the ASIO async read and blocks. More... | |
| void | read_callback (const boost::system::error_code &aErrorCode, std::size_t aBytesTransferred) |
| Callback function which is called upon completion of the ASIO async read This, then, checks the queue to see if there are more packets to be sent and if so, calls write. More... | |
| void | CheckDeadline () |
| Function called by the ASIO deadline timer. More... | |
| void | NotifyConditionalVariable (const bool &aValue) |
| Function to set the value of a variable associated with a BOOST conditional-variable and then notify that conditional variable. More... | |
| void | WaitOnConditionalVariable () |
| Function to block a thread pending a BOOST conditional-variable and its associated regular variable. More... | |
Private Attributes | |
| boost::asio::io_service | mIOservice |
| The boost::asio::io_service used to create the connections. More... | |
| boost::asio::ip::tcp::socket | mSocket |
| A shared pointer to a boost::asio tcp socket through which the operation will be performed. More... | |
| boost::asio::ip::tcp::resolver::iterator | mEndpoint |
| A shared pointer to a boost::asio tcp endpoint - used by the delayed (open-on-first-use) connect. More... | |
| boost::asio::deadline_timer | mDeadlineTimer |
| The mechanism for providing the time-out. More... | |
| boost::asio::io_service::work | mIOserviceWork |
| Needed when multi-threading to stop the boost::asio::io_service thinking it has nothing to do and so close the socket. More... | |
| boost::thread | mDispatchThread |
| The Worker thread in Multi-threaded mode. More... | |
| boost::mutex | mTransportLayerMutex |
| A MutEx lock used to make sure the access functions are thread safe. More... | |
| std::deque< boost::shared_ptr< Buffers > > | mDispatchQueue |
| The list of buffers still waiting to be sent. More... | |
| std::deque< std::pair< std::vector< boost::shared_ptr< Buffers > >, SteadyClock_t::time_point > > | mReplyQueue |
| The list of buffers still awaiting a reply. More... | |
| uint32_t | mPacketsInFlight |
| Counter of how many writes have been sent, for which no reply has yet been received. More... | |
| bool | mFlushStarted |
| Boolean specifying whether or not the main thread is within TCP::Flush method. Its value checked by the worker thread to know whether it should wait for more packets before sending onto the TCP socket. More... | |
| boost::mutex | mConditionalVariableMutex |
| A mutex for use by the conditional variable. More... | |
| boost::condition_variable | mConditionalVariable |
| A conditional variable for blocking the main thread until the variable with which it is associated is set correctly. More... | |
| bool | mFlushDone |
| A variable associated with the conditional variable which specifies whether all packets have been sent and all replies have been received. More... | |
| uint32_t | mSendByteCounter |
| Variable storing "number of bytes to follow" field for the TCP chunk currently being sent. More... | |
| uint32_t | mReplyByteCounter |
| Variable used to store "number of bytes to follow" field for the next/current TCP chunk being received. More... | |
| std::vector< boost::shared_ptr< Buffers > > | mDispatchBuffers |
| The buffers containing the payload for the send operation that's currently in progress. More... | |
| std::pair< std::vector< boost::shared_ptr< Buffers > >, SteadyClock_t::time_point > | mReplyBuffers |
| The buffers containing the payloads for the receive operation that's currently in progress. More... | |
| uhal::exception::exception * | mAsynchronousException |
| A pointer to an exception object for passing exceptions from the worker thread to the main thread. More... | |
| SteadyClock_t::time_point | mLastSendQueued |
| SteadyClock_t::time_point | mLastRecvQueued |
| TimeIntervalStats | mRTTStats |
| TimeIntervalStats | mLSTStats |
| TimeIntervalStats | mInterSendTimeStats |
| TimeIntervalStats | mInterRecvTimeStats |
Transport protocol to transfer an IPbus buffer via TCP.
Definition at line 85 of file ProtocolTCP.hpp.
|
private |
Definition at line 197 of file ProtocolTCP.hpp.
|
private |
Copy Constructor This creates a new socket, dispatch queue, dispatch thread, etc.
which connects to the same target ip/port
| aTCP | a TCP-protocol object to copy |
| uhal::TCP< InnerProtocol, nr_buffers_per_send >::TCP | ( | const std::string & | aId, |
| const URI & | aUri | ||
| ) |
Constructor.
| aId | the unique identifier that the client will be given. |
| aUri | a struct containing the full URI of the target. |
Definition at line 66 of file ProtocolTCP.cpp.
References uhal::TCP< InnerProtocol, nr_buffers_per_send >::CheckDeadline(), and uhal::TCP< InnerProtocol, nr_buffers_per_send >::mDeadlineTimer.
|
virtual |
Destructor.
Definition at line 87 of file ProtocolTCP.cpp.
References uhal::Error, uhal::TCP< InnerProtocol, nr_buffers_per_send >::mDispatchBuffers, uhal::TCP< InnerProtocol, nr_buffers_per_send >::mDispatchQueue, uhal::TCP< InnerProtocol, nr_buffers_per_send >::mDispatchThread, uhal::TCP< InnerProtocol, nr_buffers_per_send >::mIOservice, uhal::TCP< InnerProtocol, nr_buffers_per_send >::mReplyBuffers, uhal::TCP< InnerProtocol, nr_buffers_per_send >::mReplyQueue, uhal::TCP< InnerProtocol, nr_buffers_per_send >::mSocket, uhal::Quote(), uhal::ClientInterface::returnBufferToPool(), and ThisLocation.
|
private |
Function called by the ASIO deadline timer.
Definition at line 539 of file ProtocolTCP.cpp.
References uhal::Debug, uhal::TCP< InnerProtocol, nr_buffers_per_send >::mDeadlineTimer, uhal::TCP< InnerProtocol, nr_buffers_per_send >::mDispatchBuffers, uhal::TCP< InnerProtocol, nr_buffers_per_send >::mReplyBuffers, uhal::TCP< InnerProtocol, nr_buffers_per_send >::mSocket, uhal::TCP< InnerProtocol, nr_buffers_per_send >::mTransportLayerMutex, uhal::Quote(), uhal::tests::uri, and uhal::Warning.
Referenced by uhal::TCP< InnerProtocol, nr_buffers_per_send >::TCP().
|
private |
Make the TCP connection.
Definition at line 152 of file ProtocolTCP.cpp.
References uhal::Info, uhal::TCP< InnerProtocol, nr_buffers_per_send >::mDeadlineTimer, uhal::TCP< InnerProtocol, nr_buffers_per_send >::mEndpoint, uhal::TCP< InnerProtocol, nr_buffers_per_send >::mSocket, uhal::Quote(), and uhal::tests::uri.
Referenced by uhal::TCP< InnerProtocol, nr_buffers_per_send >::implementDispatch().
|
privatevirtual |
Function which tidies up this protocol layer in the event of an exception.
Definition at line 593 of file ProtocolTCP.cpp.
References uhal::TCP< InnerProtocol, nr_buffers_per_send >::mAsynchronousException, uhal::TCP< InnerProtocol, nr_buffers_per_send >::mDispatchBuffers, uhal::TCP< InnerProtocol, nr_buffers_per_send >::mDispatchQueue, uhal::TCP< InnerProtocol, nr_buffers_per_send >::mPacketsInFlight, uhal::TCP< InnerProtocol, nr_buffers_per_send >::mReplyBuffers, uhal::TCP< InnerProtocol, nr_buffers_per_send >::mReplyByteCounter, uhal::TCP< InnerProtocol, nr_buffers_per_send >::mReplyQueue, uhal::TCP< InnerProtocol, nr_buffers_per_send >::mSendByteCounter, uhal::TCP< InnerProtocol, nr_buffers_per_send >::mSocket, uhal::TCP< InnerProtocol, nr_buffers_per_send >::NotifyConditionalVariable(), uhal::Quote(), uhal::ClientInterface::returnBufferToPool(), uhal::tests::uri, and uhal::Warning.
|
privatevirtual |
Concrete implementation of the synchronization function to block until all buffers have been sent, all replies received and all data validated.
Definition at line 568 of file ProtocolTCP.cpp.
References uhal::TCP< InnerProtocol, nr_buffers_per_send >::mAsynchronousException, uhal::TCP< InnerProtocol, nr_buffers_per_send >::mDispatchBuffers, uhal::TCP< InnerProtocol, nr_buffers_per_send >::mDispatchQueue, uhal::TCP< InnerProtocol, nr_buffers_per_send >::mFlushStarted, uhal::TCP< InnerProtocol, nr_buffers_per_send >::mTransportLayerMutex, uhal::TCP< InnerProtocol, nr_buffers_per_send >::WaitOnConditionalVariable(), and uhal::TCP< InnerProtocol, nr_buffers_per_send >::write().
|
private |
Return the maximum size of reply packet based on the buffer size in the target.
Definition at line 145 of file ProtocolTCP.cpp.
|
private |
Return the maximum size to be sent based on the buffer size in the target.
Definition at line 138 of file ProtocolTCP.cpp.
|
private |
Send the IPbus buffer to the target, read back the response and call the packing-protocol's validate function.
| aBuffers | the buffer object wrapping the send and receive buffers that are to be transported If multithreaded, adds buffer to the dispatch queue and returns. If single-threaded, calls the dispatch-worker dispatch function directly and blocks until the response is validated. |
Definition at line 112 of file ProtocolTCP.cpp.
References uhal::TCP< InnerProtocol, nr_buffers_per_send >::connect(), uhal::TCP< InnerProtocol, nr_buffers_per_send >::mAsynchronousException, uhal::TCP< InnerProtocol, nr_buffers_per_send >::mDispatchBuffers, uhal::TCP< InnerProtocol, nr_buffers_per_send >::mDispatchQueue, uhal::TCP< InnerProtocol, nr_buffers_per_send >::mFlushStarted, uhal::TCP< InnerProtocol, nr_buffers_per_send >::mSocket, uhal::TCP< InnerProtocol, nr_buffers_per_send >::mTransportLayerMutex, ThisLocation, and uhal::TCP< InnerProtocol, nr_buffers_per_send >::write().
|
private |
Function to set the value of a variable associated with a BOOST conditional-variable and then notify that conditional variable.
| aValue | a value to which to update the variable associated with a BOOST conditional-variable |
Definition at line 637 of file ProtocolTCP.cpp.
References uhal::TCP< InnerProtocol, nr_buffers_per_send >::mConditionalVariable, uhal::TCP< InnerProtocol, nr_buffers_per_send >::mConditionalVariableMutex, and uhal::TCP< InnerProtocol, nr_buffers_per_send >::mFlushDone.
Referenced by uhal::TCP< InnerProtocol, nr_buffers_per_send >::dispatchExceptionHandler(), uhal::TCP< InnerProtocol, nr_buffers_per_send >::read_callback(), uhal::TCP< InnerProtocol, nr_buffers_per_send >::write(), and uhal::TCP< InnerProtocol, nr_buffers_per_send >::write_callback().
|
private |
Assignment operator This reassigns the endpoint, closes the existing socket and cleans up the buffers, etc.
On the next call which requires the socket, it will be reopened with the new endpoint.
| aTCP | a TCP-protocol object to copy |
|
private |
Initialize performing the next TCP read operation In multi-threaded mode, this runs the ASIO async read and exits In single-threaded mode, this runs the ASIO async read and blocks.
Definition at line 315 of file ProtocolTCP.cpp.
References uhal::TimeIntervalStats::add(), uhal::Debug, uhal::TCP< InnerProtocol, nr_buffers_per_send >::mDeadlineTimer, uhal::TCP< InnerProtocol, nr_buffers_per_send >::mInterRecvTimeStats, uhal::TCP< InnerProtocol, nr_buffers_per_send >::mLastRecvQueued, uhal::TCP< InnerProtocol, nr_buffers_per_send >::mReplyByteCounter, and uhal::TCP< InnerProtocol, nr_buffers_per_send >::mSocket.
Referenced by uhal::TCP< InnerProtocol, nr_buffers_per_send >::read_callback(), and uhal::TCP< InnerProtocol, nr_buffers_per_send >::write_callback().
|
private |
Callback function which is called upon completion of the ASIO async read This, then, checks the queue to see if there are more packets to be sent and if so, calls write.
| aErrorCode | the error code with which the ASIO operation completed |
Definition at line 350 of file ProtocolTCP.cpp.
References uhal::TimeIntervalStats::add(), uhal::Debug, uhal::Error, uhal::Integer(), uhal::TCP< InnerProtocol, nr_buffers_per_send >::mAsynchronousException, uhal::TCP< InnerProtocol, nr_buffers_per_send >::mDeadlineTimer, uhal::TCP< InnerProtocol, nr_buffers_per_send >::mDispatchBuffers, uhal::TCP< InnerProtocol, nr_buffers_per_send >::mDispatchQueue, uhal::TCP< InnerProtocol, nr_buffers_per_send >::mFlushStarted, uhal::TCP< InnerProtocol, nr_buffers_per_send >::mInterRecvTimeStats, uhal::TCP< InnerProtocol, nr_buffers_per_send >::mInterSendTimeStats, uhal::TCP< InnerProtocol, nr_buffers_per_send >::mLastRecvQueued, uhal::TCP< InnerProtocol, nr_buffers_per_send >::mLastSendQueued, uhal::TCP< InnerProtocol, nr_buffers_per_send >::mLSTStats, uhal::TCP< InnerProtocol, nr_buffers_per_send >::mPacketsInFlight, uhal::TCP< InnerProtocol, nr_buffers_per_send >::mReplyBuffers, uhal::TCP< InnerProtocol, nr_buffers_per_send >::mReplyByteCounter, uhal::TCP< InnerProtocol, nr_buffers_per_send >::mReplyQueue, uhal::TCP< InnerProtocol, nr_buffers_per_send >::mRTTStats, uhal::TCP< InnerProtocol, nr_buffers_per_send >::mSocket, uhal::TCP< InnerProtocol, nr_buffers_per_send >::mTransportLayerMutex, uhal::TCP< InnerProtocol, nr_buffers_per_send >::NotifyConditionalVariable(), uhal::Quote(), uhal::TCP< InnerProtocol, nr_buffers_per_send >::read(), uhal::tests::uri, uhal::ClientInterface::validate(), uhal::exception::exception::what(), and uhal::TCP< InnerProtocol, nr_buffers_per_send >::write().
|
private |
Function to block a thread pending a BOOST conditional-variable and its associated regular variable.
Definition at line 647 of file ProtocolTCP.cpp.
References uhal::TCP< InnerProtocol, nr_buffers_per_send >::mConditionalVariable, uhal::TCP< InnerProtocol, nr_buffers_per_send >::mConditionalVariableMutex, and uhal::TCP< InnerProtocol, nr_buffers_per_send >::mFlushDone.
Referenced by uhal::TCP< InnerProtocol, nr_buffers_per_send >::Flush().
|
private |
Initialize performing the next TCP write operation In multi-threaded mode, this runs the ASIO async write and exits In single-threaded mode, this runs the ASIO async write and blocks.
Definition at line 196 of file ProtocolTCP.cpp.
References uhal::TimeIntervalStats::add(), uhal::Debug, uhal::Integer(), uhal::TCP< InnerProtocol, nr_buffers_per_send >::mDeadlineTimer, uhal::TCP< InnerProtocol, nr_buffers_per_send >::mDispatchBuffers, uhal::TCP< InnerProtocol, nr_buffers_per_send >::mDispatchQueue, uhal::min, uhal::TCP< InnerProtocol, nr_buffers_per_send >::mInterSendTimeStats, uhal::TCP< InnerProtocol, nr_buffers_per_send >::mLastSendQueued, uhal::TCP< InnerProtocol, nr_buffers_per_send >::mPacketsInFlight, uhal::TCP< InnerProtocol, nr_buffers_per_send >::mSendByteCounter, uhal::TCP< InnerProtocol, nr_buffers_per_send >::mSocket, and uhal::TCP< InnerProtocol, nr_buffers_per_send >::NotifyConditionalVariable().
Referenced by uhal::TCP< InnerProtocol, nr_buffers_per_send >::Flush(), uhal::TCP< InnerProtocol, nr_buffers_per_send >::implementDispatch(), uhal::TCP< InnerProtocol, nr_buffers_per_send >::read_callback(), and uhal::TCP< InnerProtocol, nr_buffers_per_send >::write_callback().
|
private |
Callback function which is called upon completion of the ASIO async write This, then, makes a call to read to read back the reply to what has just been sent.
| aErrorCode | the error code with which the ASIO operation completed |
Definition at line 239 of file ProtocolTCP.cpp.
References uhal::Integer(), uhal::TCP< InnerProtocol, nr_buffers_per_send >::mAsynchronousException, uhal::TCP< InnerProtocol, nr_buffers_per_send >::mDeadlineTimer, uhal::TCP< InnerProtocol, nr_buffers_per_send >::mDispatchBuffers, uhal::TCP< InnerProtocol, nr_buffers_per_send >::mDispatchQueue, uhal::TCP< InnerProtocol, nr_buffers_per_send >::mFlushStarted, uhal::TCP< InnerProtocol, nr_buffers_per_send >::mLastSendQueued, uhal::TCP< InnerProtocol, nr_buffers_per_send >::mPacketsInFlight, uhal::TCP< InnerProtocol, nr_buffers_per_send >::mReplyBuffers, uhal::TCP< InnerProtocol, nr_buffers_per_send >::mReplyQueue, uhal::TCP< InnerProtocol, nr_buffers_per_send >::mSendByteCounter, uhal::TCP< InnerProtocol, nr_buffers_per_send >::mSocket, uhal::TCP< InnerProtocol, nr_buffers_per_send >::mTransportLayerMutex, uhal::TCP< InnerProtocol, nr_buffers_per_send >::NotifyConditionalVariable(), uhal::Quote(), uhal::TCP< InnerProtocol, nr_buffers_per_send >::read(), uhal::tests::uri, and uhal::TCP< InnerProtocol, nr_buffers_per_send >::write().
|
private |
A pointer to an exception object for passing exceptions from the worker thread to the main thread.
Exceptions must always be created on the heap (i.e. using new) and deletion will be handled in the main thread
Definition at line 269 of file ProtocolTCP.hpp.
Referenced by uhal::TCP< InnerProtocol, nr_buffers_per_send >::dispatchExceptionHandler(), uhal::TCP< InnerProtocol, nr_buffers_per_send >::Flush(), uhal::TCP< InnerProtocol, nr_buffers_per_send >::implementDispatch(), uhal::TCP< InnerProtocol, nr_buffers_per_send >::read_callback(), and uhal::TCP< InnerProtocol, nr_buffers_per_send >::write_callback().
|
private |
A conditional variable for blocking the main thread until the variable with which it is associated is set correctly.
Definition at line 234 of file ProtocolTCP.hpp.
Referenced by uhal::TCP< InnerProtocol, nr_buffers_per_send >::NotifyConditionalVariable(), and uhal::TCP< InnerProtocol, nr_buffers_per_send >::WaitOnConditionalVariable().
|
private |
A mutex for use by the conditional variable.
Definition at line 232 of file ProtocolTCP.hpp.
Referenced by uhal::TCP< InnerProtocol, nr_buffers_per_send >::NotifyConditionalVariable(), and uhal::TCP< InnerProtocol, nr_buffers_per_send >::WaitOnConditionalVariable().
|
private |
The mechanism for providing the time-out.
Definition at line 209 of file ProtocolTCP.hpp.
Referenced by uhal::TCP< InnerProtocol, nr_buffers_per_send >::CheckDeadline(), uhal::TCP< InnerProtocol, nr_buffers_per_send >::connect(), uhal::TCP< InnerProtocol, nr_buffers_per_send >::read(), uhal::TCP< InnerProtocol, nr_buffers_per_send >::read_callback(), uhal::TCP< InnerProtocol, nr_buffers_per_send >::TCP(), uhal::TCP< InnerProtocol, nr_buffers_per_send >::write(), and uhal::TCP< InnerProtocol, nr_buffers_per_send >::write_callback().
|
private |
The buffers containing the payload for the send operation that's currently in progress.
Definition at line 257 of file ProtocolTCP.hpp.
Referenced by uhal::TCP< InnerProtocol, nr_buffers_per_send >::CheckDeadline(), uhal::TCP< InnerProtocol, nr_buffers_per_send >::dispatchExceptionHandler(), uhal::TCP< InnerProtocol, nr_buffers_per_send >::Flush(), uhal::TCP< InnerProtocol, nr_buffers_per_send >::implementDispatch(), uhal::TCP< InnerProtocol, nr_buffers_per_send >::read_callback(), uhal::TCP< InnerProtocol, nr_buffers_per_send >::write(), uhal::TCP< InnerProtocol, nr_buffers_per_send >::write_callback(), and uhal::TCP< InnerProtocol, nr_buffers_per_send >::~TCP().
|
private |
The list of buffers still waiting to be sent.
Definition at line 221 of file ProtocolTCP.hpp.
Referenced by uhal::TCP< InnerProtocol, nr_buffers_per_send >::dispatchExceptionHandler(), uhal::TCP< InnerProtocol, nr_buffers_per_send >::Flush(), uhal::TCP< InnerProtocol, nr_buffers_per_send >::implementDispatch(), uhal::TCP< InnerProtocol, nr_buffers_per_send >::read_callback(), uhal::TCP< InnerProtocol, nr_buffers_per_send >::write(), uhal::TCP< InnerProtocol, nr_buffers_per_send >::write_callback(), and uhal::TCP< InnerProtocol, nr_buffers_per_send >::~TCP().
|
private |
The Worker thread in Multi-threaded mode.
Definition at line 215 of file ProtocolTCP.hpp.
Referenced by uhal::TCP< InnerProtocol, nr_buffers_per_send >::~TCP().
|
private |
A shared pointer to a boost::asio tcp endpoint - used by the delayed (open-on-first-use) connect.
Definition at line 206 of file ProtocolTCP.hpp.
Referenced by uhal::TCP< InnerProtocol, nr_buffers_per_send >::connect().
|
private |
A variable associated with the conditional variable which specifies whether all packets have been sent and all replies have been received.
Definition at line 236 of file ProtocolTCP.hpp.
Referenced by uhal::TCP< InnerProtocol, nr_buffers_per_send >::NotifyConditionalVariable(), and uhal::TCP< InnerProtocol, nr_buffers_per_send >::WaitOnConditionalVariable().
|
private |
Boolean specifying whether or not the main thread is within TCP::Flush method. Its value checked by the worker thread to know whether it should wait for more packets before sending onto the TCP socket.
Definition at line 229 of file ProtocolTCP.hpp.
Referenced by uhal::TCP< InnerProtocol, nr_buffers_per_send >::Flush(), uhal::TCP< InnerProtocol, nr_buffers_per_send >::implementDispatch(), uhal::TCP< InnerProtocol, nr_buffers_per_send >::read_callback(), and uhal::TCP< InnerProtocol, nr_buffers_per_send >::write_callback().
|
private |
Definition at line 278 of file ProtocolTCP.hpp.
Referenced by uhal::TCP< InnerProtocol, nr_buffers_per_send >::read(), and uhal::TCP< InnerProtocol, nr_buffers_per_send >::read_callback().
|
private |
Definition at line 277 of file ProtocolTCP.hpp.
Referenced by uhal::TCP< InnerProtocol, nr_buffers_per_send >::read_callback(), and uhal::TCP< InnerProtocol, nr_buffers_per_send >::write().
|
private |
The boost::asio::io_service used to create the connections.
Definition at line 200 of file ProtocolTCP.hpp.
Referenced by uhal::TCP< InnerProtocol, nr_buffers_per_send >::~TCP().
|
private |
Needed when multi-threading to stop the boost::asio::io_service thinking it has nothing to do and so close the socket.
Definition at line 212 of file ProtocolTCP.hpp.
|
private |
Definition at line 273 of file ProtocolTCP.hpp.
Referenced by uhal::TCP< InnerProtocol, nr_buffers_per_send >::read(), and uhal::TCP< InnerProtocol, nr_buffers_per_send >::read_callback().
|
private |
Definition at line 272 of file ProtocolTCP.hpp.
Referenced by uhal::TCP< InnerProtocol, nr_buffers_per_send >::read_callback(), uhal::TCP< InnerProtocol, nr_buffers_per_send >::write(), and uhal::TCP< InnerProtocol, nr_buffers_per_send >::write_callback().
|
private |
Definition at line 276 of file ProtocolTCP.hpp.
Referenced by uhal::TCP< InnerProtocol, nr_buffers_per_send >::read_callback().
|
private |
Counter of how many writes have been sent, for which no reply has yet been received.
Definition at line 226 of file ProtocolTCP.hpp.
Referenced by uhal::TCP< InnerProtocol, nr_buffers_per_send >::dispatchExceptionHandler(), uhal::TCP< InnerProtocol, nr_buffers_per_send >::read_callback(), uhal::TCP< InnerProtocol, nr_buffers_per_send >::write(), and uhal::TCP< InnerProtocol, nr_buffers_per_send >::write_callback().
|
private |
The buffers containing the payloads for the receive operation that's currently in progress.
Definition at line 263 of file ProtocolTCP.hpp.
Referenced by uhal::TCP< InnerProtocol, nr_buffers_per_send >::CheckDeadline(), uhal::TCP< InnerProtocol, nr_buffers_per_send >::dispatchExceptionHandler(), uhal::TCP< InnerProtocol, nr_buffers_per_send >::read_callback(), uhal::TCP< InnerProtocol, nr_buffers_per_send >::write_callback(), and uhal::TCP< InnerProtocol, nr_buffers_per_send >::~TCP().
|
private |
Variable used to store "number of bytes to follow" field for the next/current TCP chunk being received.
Definition at line 251 of file ProtocolTCP.hpp.
Referenced by uhal::TCP< InnerProtocol, nr_buffers_per_send >::dispatchExceptionHandler(), uhal::TCP< InnerProtocol, nr_buffers_per_send >::read(), and uhal::TCP< InnerProtocol, nr_buffers_per_send >::read_callback().
|
private |
The list of buffers still awaiting a reply.
Definition at line 223 of file ProtocolTCP.hpp.
Referenced by uhal::TCP< InnerProtocol, nr_buffers_per_send >::dispatchExceptionHandler(), uhal::TCP< InnerProtocol, nr_buffers_per_send >::read_callback(), uhal::TCP< InnerProtocol, nr_buffers_per_send >::write_callback(), and uhal::TCP< InnerProtocol, nr_buffers_per_send >::~TCP().
|
private |
Definition at line 275 of file ProtocolTCP.hpp.
Referenced by uhal::TCP< InnerProtocol, nr_buffers_per_send >::read_callback().
|
private |
Variable storing "number of bytes to follow" field for the TCP chunk currently being sent.
Definition at line 244 of file ProtocolTCP.hpp.
Referenced by uhal::TCP< InnerProtocol, nr_buffers_per_send >::dispatchExceptionHandler(), uhal::TCP< InnerProtocol, nr_buffers_per_send >::write(), and uhal::TCP< InnerProtocol, nr_buffers_per_send >::write_callback().
|
private |
A shared pointer to a boost::asio tcp socket through which the operation will be performed.
Definition at line 203 of file ProtocolTCP.hpp.
Referenced by uhal::TCP< InnerProtocol, nr_buffers_per_send >::CheckDeadline(), uhal::TCP< InnerProtocol, nr_buffers_per_send >::connect(), uhal::TCP< InnerProtocol, nr_buffers_per_send >::dispatchExceptionHandler(), uhal::TCP< InnerProtocol, nr_buffers_per_send >::implementDispatch(), uhal::TCP< InnerProtocol, nr_buffers_per_send >::read(), uhal::TCP< InnerProtocol, nr_buffers_per_send >::read_callback(), uhal::TCP< InnerProtocol, nr_buffers_per_send >::write(), uhal::TCP< InnerProtocol, nr_buffers_per_send >::write_callback(), and uhal::TCP< InnerProtocol, nr_buffers_per_send >::~TCP().
|
private |
A MutEx lock used to make sure the access functions are thread safe.
Definition at line 218 of file ProtocolTCP.hpp.
Referenced by uhal::TCP< InnerProtocol, nr_buffers_per_send >::CheckDeadline(), uhal::TCP< InnerProtocol, nr_buffers_per_send >::Flush(), uhal::TCP< InnerProtocol, nr_buffers_per_send >::implementDispatch(), uhal::TCP< InnerProtocol, nr_buffers_per_send >::read_callback(), and uhal::TCP< InnerProtocol, nr_buffers_per_send >::write_callback().
1.8.13