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
c38a1608
Commit
c38a1608
authored
Sep 18, 2014
by
Dominik Charousset
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Coding style nitpicks
parent
51fdf9a8
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
16 additions
and
13 deletions
+16
-13
libcaf_io/caf/io/network/multiplexer.hpp
libcaf_io/caf/io/network/multiplexer.hpp
+5
-5
libcaf_io/caf/io/publish.hpp
libcaf_io/caf/io/publish.hpp
+11
-8
No files found.
libcaf_io/caf/io/network/multiplexer.hpp
View file @
c38a1608
...
...
@@ -62,8 +62,8 @@ class multiplexer {
* Tries to connect to host `h` on given `port` and returns a
* new scribe managing the connection on success.
*/
virtual
connection_handle
add_tcp_scribe
(
broker
*
ptr
,
const
std
::
string
&
h
,
uint16_t
port
)
=
0
;
virtual
connection_handle
add_tcp_scribe
(
broker
*
ptr
,
const
std
::
string
&
h
ost
,
uint16_t
port
)
=
0
;
/**
* Creates a new TCP doorman from a native socket handle.
...
...
@@ -72,10 +72,10 @@ class multiplexer {
/**
* Tries to create a new TCP doorman running on port `p`, optionally
* accepting only connections from
host `h
`.
* accepting only connections from
IP address `in
`.
*/
virtual
accept_handle
add_tcp_doorman
(
broker
*
ptr
,
uint16_t
p
,
const
char
*
h
=
nullptr
)
=
0
;
virtual
accept_handle
add_tcp_doorman
(
broker
*
ptr
,
uint16_t
p
ort
,
const
char
*
in
=
nullptr
)
=
0
;
/**
* Simple wrapper for runnables
...
...
libcaf_io/caf/io/publish.hpp
View file @
c38a1608
...
...
@@ -34,13 +34,14 @@ namespace io {
* Publishes `whom` at `port`. The connection is managed by the middleman.
* @param whom Actor that should be published at `port`.
* @param port Unused TCP port.
* @param addr The IP address to listen to or `INADDR_ANY` if `
addr
== nullptr`.
* @param addr The IP address to listen to or `INADDR_ANY` if `
in
== nullptr`.
* @throws bind_failure
*/
inline
void
publish
(
caf
::
actor
whom
,
uint16_t
port
,
const
char
*
addr
=
nullptr
)
{
if
(
!
whom
)
return
;
io
::
publish_impl
(
actor_cast
<
abstract_actor_ptr
>
(
whom
),
port
,
addr
);
inline
void
publish
(
caf
::
actor
whom
,
uint16_t
port
,
const
char
*
in
=
nullptr
)
{
if
(
!
whom
)
{
return
;
}
io
::
publish_impl
(
actor_cast
<
abstract_actor_ptr
>
(
whom
),
port
,
in
);
}
/**
...
...
@@ -48,9 +49,11 @@ inline void publish(caf::actor whom, uint16_t port,
*/
template
<
class
...
Rs
>
void
typed_publish
(
typed_actor
<
Rs
...
>
whom
,
uint16_t
port
,
const
char
*
addr
=
nullptr
)
{
if
(
!
whom
)
return
;
io
::
publish_impl
(
actor_cast
<
abstract_actor_ptr
>
(
whom
),
port
,
addr
);
const
char
*
in
=
nullptr
)
{
if
(
!
whom
)
{
return
;
}
io
::
publish_impl
(
actor_cast
<
abstract_actor_ptr
>
(
whom
),
port
,
in
);
}
}
// namespace io
...
...
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