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
563e289c
Commit
563e289c
authored
Sep 08, 2014
by
Dominik Charousset
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix group_chat example
parent
41888dc5
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
3 deletions
+8
-3
examples/remote_actors/group_chat.cpp
examples/remote_actors/group_chat.cpp
+8
-3
No files found.
examples/remote_actors/group_chat.cpp
View file @
563e289c
...
...
@@ -16,6 +16,7 @@
#include <iostream>
#include "caf/all.hpp"
#include "caf/io/all.hpp"
// the options_description API is deprecated
#include "cppa/opt.hpp"
...
...
@@ -101,8 +102,10 @@ int main(int argc, char** argv) {
<<
", expected format: <module_name>:<group_id>"
;
}
else
{
try
{
auto
g
=
group
::
get
(
group_id
.
substr
(
0
,
p
),
group_id
.
substr
(
p
+
1
));
auto
module
=
group_id
.
substr
(
0
,
p
);
auto
group_uri
=
group_id
.
substr
(
p
+
1
);
auto
g
=
(
module
==
"remote"
)
?
io
::
remote_group
(
group_uri
)
:
group
::
get
(
module
,
group_uri
);
anon_send
(
client_actor
,
atom
(
"join"
),
g
);
}
catch
(
exception
&
e
)
{
...
...
@@ -127,7 +130,9 @@ int main(int argc, char** argv) {
match_each
(
lines
,
eof
,
split_line
)
(
on
(
"/join"
,
arg_match
)
>>
[
&
](
const
string
&
mod
,
const
string
&
id
)
{
try
{
anon_send
(
client_actor
,
atom
(
"join"
),
group
::
get
(
mod
,
id
));
group
grp
=
(
mod
==
"remote"
)
?
io
::
remote_group
(
id
)
:
group
::
get
(
mod
,
id
);
anon_send
(
client_actor
,
atom
(
"join"
),
grp
);
}
catch
(
exception
&
e
)
{
cerr
<<
"*** exception: "
<<
to_verbose_string
(
e
)
<<
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