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
b05e36d3
Commit
b05e36d3
authored
Sep 18, 2014
by
Dominik Charousset
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Print handle ID in HTTP broker example
parent
d73291f1
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
2 deletions
+3
-2
examples/brokers/simple_http_broker.cpp
examples/brokers/simple_http_broker.cpp
+3
-2
No files found.
examples/brokers/simple_http_broker.cpp
View file @
b05e36d3
...
...
@@ -44,7 +44,7 @@ behavior connection_worker(broker* self, connection_handle hdl) {
self
->
configure_read
(
hdl
,
receive_policy
::
at_most
(
1024
));
return
{
[
=
](
const
new_data_msg
&
msg
)
{
wout
(
self
)
<<
"received
data
, send http_ok"
<<
endl
;
wout
(
self
)
<<
"received
HTTP request
, send http_ok"
<<
endl
;
self
->
write
(
msg
.
handle
,
cstr_size
(
http_ok
),
http_ok
);
self
->
quit
();
},
...
...
@@ -62,7 +62,8 @@ behavior server(broker* self) {
auto
worker
=
self
->
fork
(
connection_worker
,
ncm
.
handle
);
self
->
monitor
(
worker
);
self
->
link_to
(
worker
);
sout
(
self
)
<<
"forked connection, worker ID: "
<<
worker
.
id
()
<<
endl
;
sout
(
self
)
<<
"forked connection, handle ID: "
<<
ncm
.
handle
.
id
()
<<
", worker ID: "
<<
worker
.
id
()
<<
endl
;
},
[
=
](
const
down_msg
&
dm
)
{
sout
(
self
)
<<
"worker with ID "
<<
dm
.
source
.
id
()
<<
" is done"
<<
endl
;
...
...
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