Commit fd513a61 authored by Dominik Charousset's avatar Dominik Charousset

Improve documentation of multiplexers

parent 1bacec77
......@@ -125,7 +125,8 @@ public:
/// Runs the multiplexers event loop.
virtual void run() = 0;
/// Invokes @p fun in the multiplexer's event loop.
/// Invokes @p fun in the multiplexer's event loop, calling `fun()`
/// immediately when called from inside the event loop.
/// @threadsafe
template <class F>
void dispatch(F fun) {
......@@ -136,7 +137,8 @@ public:
post(std::move(fun));
}
/// Invokes @p fun in the multiplexer's event loop.
/// Invokes @p fun in the multiplexer's event loop, forcing
/// execution to be delayed when called from inside the event loop.
/// @threadsafe
template <class F>
void post(F fun) {
......
......@@ -63,30 +63,36 @@ public:
void provide_acceptor(uint16_t port, accept_handle hdl);
/// A buffer storing bytes.
using buffer_type = std::vector<char>;
/// The external input buffer should be filled by
/// the test program.
/// Models pending data on the network, i.e., the network
/// input buffer usually managed by the operating system.
buffer_type& virtual_network_buffer(connection_handle hdl);
/// Returns the output buffer of the scribe identified by `hdl`.
buffer_type& output_buffer(connection_handle hdl);
/// Returns the input buffer of the scribe identified by `hdl`.
buffer_type& input_buffer(connection_handle hdl);
receive_policy::config& read_config(connection_handle hdl);
/// Returns `true` if this handle has been closed
/// for reading, `false` otherwise.
bool& stopped_reading(connection_handle hdl);
intrusive_ptr<scribe>& impl_ptr(connection_handle hdl);
uint16_t& port(accept_handle hdl);
/// Returns `true` if this handle has been closed for reading,
/// `false` otherwise.
/// Returns `true` if this handle has been closed
/// for reading, `false` otherwise.
bool& stopped_reading(accept_handle hdl);
intrusive_ptr<doorman>& impl_ptr(accept_handle hdl);
/// Stores `hdl` as a pending connection for `src`.
void add_pending_connect(accept_handle src, connection_handle hdl);
using pending_connects_map = std::unordered_multimap<accept_handle,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment