#include <SocketSendQueue.hpp>
|
| using | Socket = boost::asio::ip::tcp::socket |
|
| void | process () |
| | This method can be called arbitrarily many times, but enough times to ensure the queue makes progress.
|
|
| std::deque< SendItem > | _itemQueue |
| | The queue, containing items to asynchronously send using boost.asio.
|
| std::mutex | _queueMutex {} |
| | The mutex protecting access to the queue.
|
| bool | _ready = true |
| | Is the queue allowed to start another asynchronous send?
|
This Queue is intended for SocketCommunication to push requests which should be sent onto it. It ensures that the invocations of asio::aSend are done serially.
Definition at line 15 of file SocketSendQueue.hpp.
◆ Socket
◆ SocketSendQueue() [1/2]
| precice::com::SocketSendQueue::SocketSendQueue |
( |
| ) |
|
|
default |
◆ ~SocketSendQueue()
| precice::com::SocketSendQueue::~SocketSendQueue |
( |
| ) |
|
If items are left in the queue upon destruction, something went really wrong.
Definition at line 15 of file SocketSendQueue.cpp.
◆ SocketSendQueue() [2/2]
◆ dispatch()
| void precice::com::SocketSendQueue::dispatch |
( |
std::shared_ptr< Socket > | sock, |
|
|
boost::asio::const_buffer | data, |
|
|
std::function< void()> | callback ) |
◆ operator=()
◆ process()
| void precice::com::SocketSendQueue::process |
( |
| ) |
|
|
private |
This method can be called arbitrarily many times, but enough times to ensure the queue makes progress.
Definition at line 37 of file SocketSendQueue.cpp.
◆ sendCompleted()
| void precice::com::SocketSendQueue::sendCompleted |
( |
| ) |
|
Notifies the queue that the last asynchronous send operation has completed.
Definition at line 30 of file SocketSendQueue.cpp.
◆ _itemQueue
| std::deque<SendItem> precice::com::SocketSendQueue::_itemQueue |
|
private |
The queue, containing items to asynchronously send using boost.asio.
Definition at line 42 of file SocketSendQueue.hpp.
◆ _queueMutex
| std::mutex precice::com::SocketSendQueue::_queueMutex {} |
|
private |
◆ _ready
| bool precice::com::SocketSendQueue::_ready = true |
|
private |
Is the queue allowed to start another asynchronous send?
Definition at line 46 of file SocketSendQueue.hpp.
The documentation for this class was generated from the following files: