Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
A
Actor Framework
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
cpp-libs
Actor Framework
Commits
fd513a61
Commit
fd513a61
authored
Aug 21, 2015
by
Dominik Charousset
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Improve documentation of multiplexers
parent
1bacec77
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
14 additions
and
6 deletions
+14
-6
libcaf_io/caf/io/network/multiplexer.hpp
libcaf_io/caf/io/network/multiplexer.hpp
+4
-2
libcaf_io/caf/io/network/test_multiplexer.hpp
libcaf_io/caf/io/network/test_multiplexer.hpp
+10
-4
No files found.
libcaf_io/caf/io/network/multiplexer.hpp
View file @
fd513a61
...
...
@@ -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
)
{
...
...
libcaf_io/caf/io/network/test_multiplexer.hpp
View file @
fd513a61
...
...
@@ -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 progra
m.
///
Models pending data on the network, i.e., the network
///
input buffer usually managed by the operating syste
m.
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
,
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment