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
d7653648
Commit
d7653648
authored
Jan 06, 2021
by
Dominik Charousset
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix setup for Qt and Protobuf examples
parent
52110a9b
Changes
16
Hide whitespace changes
Inline
Side-by-side
Showing
16 changed files
with
181 additions
and
193 deletions
+181
-193
.ci/centos-7/Dockerfile
.ci/centos-7/Dockerfile
+12
-14
.ci/centos-8/Dockerfile
.ci/centos-8/Dockerfile
+10
-9
.ci/debian-10/Dockerfile
.ci/debian-10/Dockerfile
+9
-10
.ci/debian-9/Dockerfile
.ci/debian-9/Dockerfile
+12
-12
.ci/fedora-31/Dockerfile
.ci/fedora-31/Dockerfile
+11
-12
.ci/fedora-32/Dockerfile
.ci/fedora-32/Dockerfile
+11
-15
.ci/ubuntu-16.04/Dockerfile
.ci/ubuntu-16.04/Dockerfile
+11
-12
.ci/ubuntu-18.04/Dockerfile
.ci/ubuntu-18.04/Dockerfile
+9
-10
.ci/ubuntu-20.04/Dockerfile
.ci/ubuntu-20.04/Dockerfile
+9
-13
.clang-format
.clang-format
+3
-0
Jenkinsfile
Jenkinsfile
+8
-16
configure
configure
+0
-1
examples/CMakeLists.txt
examples/CMakeLists.txt
+18
-15
examples/broker/protobuf_broker.cpp
examples/broker/protobuf_broker.cpp
+51
-52
examples/qtsupport/chatwidget.cpp
examples/qtsupport/chatwidget.cpp
+4
-1
examples/remoting/pingpong.proto
examples/remoting/pingpong.proto
+3
-1
No files found.
.ci/centos-7/Dockerfile
View file @
d7653648
FROM
centos:7
RUN
yum update
-y
\
&&
yum
install
-y
centos-release-scl
\
&&
yum
install
-y
epel-release
\
&&
yum update
-y
\
&&
yum clean all
RUN
yum
install
-y
\
cmake3
\
devtoolset-7
\
devtoolset-7-libasan-devel
\
devtoolset-7-libubsan-devel
\
git
\
make
\
openssl-devel
\
&&
yum clean all
&&
yum
install
-y
centos-release-scl
\
&&
yum
install
-y
epel-release
\
&&
yum update
-y
\
&&
yum
install
-y
\
cmake3
\
devtoolset-7
\
devtoolset-7-libasan-devel
\
devtoolset-7-libubsan-devel
\
git
\
make
\
openssl-devel
\
&&
yum clean all
ENV
CXX=/opt/rh/devtoolset-7/root/usr/bin/g++
.ci/centos-8/Dockerfile
View file @
d7653648
FROM
centos:8
RUN
yum
install
-y
\
cmake
\
gcc-c++
\
libasan
\
libubsan
\
git
\
make
\
openssl-devel
\
&&
yum clean all
RUN
dnf update
-y
\
&&
dnf
install
-y
\
cmake
\
gcc-c++
\
git
\
libasan
\
libubsan
\
make
\
openssl-devel
\
&&
dnf clean all
.ci/debian-10/Dockerfile
View file @
d7653648
FROM
debian:10
RUN
apt update
-y
&&
\
apt upgrade
-y
RUN
apt
install
-y
\
cmake
\
g++
\
git
\
libssl-dev
\
make
\
&&
apt autoclean
RUN
apt update
-y
\
&&
apt upgrade
-y
\
&&
apt
install
-y
\
cmake
\
g++
\
git
\
libssl-dev
\
make
\
&&
apt autoclean
.ci/debian-9/Dockerfile
View file @
d7653648
FROM
debian:9
RUN
apt update
-y
&&
\
apt upgrade
-y
RUN
apt
install
-y
\
clang-7
\
libc++-7-dev
\
libc++abi
-7-dev
\
cmake
\
git
\
libssl-dev
\
make
\
&&
apt autoclean
RUN
apt update
-y
\
&&
apt upgrade
-y
\
&&
apt
install
-y
\
clang-7
\
cmake
\
git
\
libc++
-7-dev
\
libc++abi-7-dev
\
libprotobuf-dev
\
libssl-dev
\
make
\
&&
apt autoclean
ENV
CXX=/usr/bin/clang++-7
ENV
CXXFLAGS=-stdlib=libc++
.ci/fedora-31/Dockerfile
View file @
d7653648
FROM
fedora:31
RUN
dnf update
-y
&&
\
dnf clean all
RUN
dnf
install
-y
\
git
\
make
\
cmake
\
gcc-c++
\
openssl-devel
\
libasan
\
libubsan
\
&&
dnf clean all
RUN
dnf update
-y
\
&&
dnf clean all
\
&&
dnf
install
-y
\
cmake
\
gcc-c++
\
git
\
libasan
\
libubsan
\
make
\
openssl-devel
\
&&
dnf clean all
.ci/fedora-32/Dockerfile
View file @
d7653648
FROM
fedora:32
RUN
dnf update
-y
&&
\
dnf clean all
RUN
dnf
install
-y
\
git
\
make
\
cmake
\
gcc-c++
\
openssl-devel
\
libasan
\
libubsan
\
libcurl-devel
\
qt5-devel
\
protobuf-devel
\
&&
dnf clean all
RUN
dnf update
-y
\
&&
dnf clean all
\
&&
dnf
install
-y
\
cmake
\
gcc-c++
\
git
\
libasan
\
libubsan
\
make
\
openssl-devel
\
&&
dnf clean all
.ci/ubuntu-16.04/Dockerfile
View file @
d7653648
FROM
ubuntu:16.04
RUN
\
apt update
-y
\
&&
apt upgrade
-y
\
&&
apt
install
-y
\
clang-8
\
libc++-8-dev
\
libc++abi-8-dev
\
cmake
\
git
\
libssl-dev
\
make
\
&&
apt autoclean
RUN
apt update
-y
\
&&
apt upgrade
-y
\
&&
apt
install
-y
\
clang-8
\
cmake
\
git
\
libc++-8-dev
\
libc++abi-8-dev
\
libssl-dev
\
make
\
&&
apt autoclean
ENV
CXX=/usr/bin/clang++-8
ENV
CXXFLAGS=-stdlib=libc++
.ci/ubuntu-18.04/Dockerfile
View file @
d7653648
FROM
ubuntu:18.04
RUN
apt update
-y
&&
\
apt upgrade
-y
RUN
apt
install
-y
\
cmake
\
g++-8
\
git
\
libssl-dev
\
make
\
&&
apt-get autoclean
RUN
apt update
-y
\
&&
apt upgrade
-y
\
&&
apt
install
-y
\
cmake
\
g++-8
\
git
\
libssl-dev
\
make
\
&&
apt-get autoclean
ENV
CXX=/usr/bin/g++-8
.ci/ubuntu-20.04/Dockerfile
View file @
d7653648
FROM
ubuntu:20.04
ENV
TZ=Europe/Berlin
RUN
ln
-snf
/usr/share/zoneinfo/
$TZ
/etc/localtime
&&
echo
$TZ
>
/etc/timezone
RUN
apt update
-y
&&
\
apt upgrade
-y
RUN
apt
install
-y
\
cmake
\
g++
\
git
\
libssl-dev
\
make
\
&&
apt-get autoclean
RUN
apt update
-y
\
&&
apt upgrade
-y
\
&&
DEBIAN_FRONTEND
=
"noninteractive"
apt
install
-y
\
cmake
\
g++
\
git
\
libssl-dev
\
make
\
&&
apt-get autoclean
.clang-format
View file @
d7653648
...
...
@@ -59,4 +59,7 @@ SpacesInParentheses: false
SpacesInSquareBrackets: false
Standard: Cpp11
UseTab: Never
---
Language: Proto
DisableFormat: true
...
Jenkinsfile
View file @
d7653648
...
...
@@ -17,8 +17,9 @@ config = [
],
// Default CMake flags by build type.
buildFlags:
[
'CAF_ENABLE_RUNTIME_CHECKS:BOOL=ON'
,
'CAF_ENABLE_ACTOR_PROFILER:BOOL=ON'
,
'CAF_ENABLE_EXAMPLES:BOOL=ON'
,
'CAF_ENABLE_RUNTIME_CHECKS:BOOL=ON'
,
],
extraDebugFlags:
[
'CAF_LOG_LEVEL:STRING=TRACE'
,
...
...
@@ -107,25 +108,16 @@ config = [
'LDFLAGS=-fno-sanitize-recover=undefined'
,
],
]],
// One extra debug build with all examples.
[
'fedora-32'
,
[
numCores:
4
,
tags:
[
'docker'
],
builds:
[
'debug'
],
extraBuildFlags:
[
'CAF_ENABLE_EXAMPLES:BOOL=ON'
,
'CAF_ENABLE_QT5_EXAMPLES:BOOL=ON'
,
'CAF_ENABLE_CURL_EXAMPLES:BOOL=ON'
,
'CAF_ENABLE_PROTOBUF_EXAMPLES:BOOL=ON'
,
],
]],
// Other UNIX systems.
// Other UNIX systems. On macOS, we also build *all* examples.
[
'macOS'
,
[
numCores:
4
,
builds:
[
'debug'
,
'release'
],
extraBuildFlags:
[
'CAF_ENABLE_CURL_EXAMPLES:BOOL=ON'
,
'CAF_ENABLE_PROTOBUF_EXAMPLES:BOOL=ON'
,
'CAF_ENABLE_QT5_EXAMPLES:BOOL=ON'
,
'OPENSSL_ROOT_DIR:PATH=/usr/local/opt/openssl'
,
'
OPENSSL_INCLUDE_DIR:PATH=/usr/local/opt/openssl/include
'
,
'
Qt5_DIR:PATH=/usr/local/opt/qt/lib/cmake/Qt5
'
,
],
extraDebugBuildFlags:
[
'CAF_SANITIZERS:STRING=address'
,
...
...
@@ -145,7 +137,7 @@ config = [
//builds: ['debug', 'release'],
builds:
[
'release'
],
extraBuildFlags:
[
'CAF_ENABLE_OPENSSL_MODULE:BOOL=OFF'
'CAF_ENABLE_OPENSSL_MODULE:BOOL=OFF'
,
],
]],
],
...
...
configure
View file @
d7653648
...
...
@@ -70,7 +70,6 @@ Influential Environment Variables (only on first invocation):
CXX C++ compiler command
CXXFLAGS Additional C++ compiler flags
LDFLAGS Additional linker flags
CMAKE_GENERATOR Selects a custom generator
"
# Appends a CMake cache entry definition to the CMakeCacheEntries variable.
...
...
examples/CMakeLists.txt
View file @
d7653648
...
...
@@ -82,28 +82,31 @@ if(TARGET CAF::io)
if
(
CAF_ENABLE_QT5_EXAMPLES
)
find_package
(
Qt5 COMPONENTS Core Gui Widgets REQUIRED
)
message
(
STATUS
"Found Qt5"
)
#include(${QT_USE_FILE})
QT5_ADD_RESOURCES
(
GROUP_CHAT_RCS
)
QT5_WRAP_UI
(
GROUP_CHAT_UI_HDR qtsupport/chatwindow.ui
)
QT5_WRAP_CPP
(
GROUP_CHAT_MOC_SRC qtsupport/chatwidget.hpp
)
qt5_wrap_ui
(
GROUP_CHAT_UI_HDR qtsupport/chatwindow.ui
)
qt5_wrap_cpp
(
GROUP_CHAT_MOC_SRC qtsupport/chatwidget.hpp
)
# generated headers will be in cmake build directory
include_directories
(
qtsupport
${
CMAKE_CURRENT_BINARY_DIR
}
${
Qt5Core_INCLUDE_DIRS
}
${
Qt5Gui_INCLUDE_DIRS
}
${
Qt5Widgets_INCLUDE_DIRS
}
)
set
(
GROUP_CHAT_SRC qtsupport/qt_group_chat.cpp qtsupport/chatwidget.cpp
)
add_executable
(
qt_group_chat
${
GROUP_CHAT_SRC
}
qtsupport/qt_group_chat.cpp
qtsupport/chatwidget.cpp
${
GROUP_CHAT_MOC_SRC
}
${
GROUP_CHAT_UI_HDR
}
)
target_link_libraries
(
qt_group_chat
CAF::io
CAF::internal
Qt5::Core
Qt5::Gui
Qt5::Widgets
CAF::io
CAF::internal
)
Qt5::Widgets
)
target_include_directories
(
qt_group_chat PRIVATE
qtsupport
${
CMAKE_CURRENT_BINARY_DIR
}
${
Qt5Core_INCLUDE_DIRS
}
${
Qt5Gui_INCLUDE_DIRS
}
${
Qt5Widgets_INCLUDE_DIRS
}
)
if
(
CMAKE_VERSION VERSION_LESS 3.8
)
message
(
STATUS
"Note: build fails if Qt5 sets incompatible -std=ARG flag"
)
else
()
set_property
(
TARGET qt_group_chat PROPERTY CXX_STANDARD 17
)
endif
()
add_dependencies
(
qt_group_chat all_examples
)
endif
()
...
...
examples/broker/protobuf_broker.cpp
View file @
d7653648
#include <vector>
#include <string>
#include <iostream>
#include <limits>
#include <memory>
#include <iostream>
#include <string>
#include <vector>
#include "caf/all.hpp"
#include "caf/io/all.hpp"
#ifdef CAF_WINDOWS
#include <winsock2.h>
#
include <winsock2.h>
#else
#include <arpa/inet.h>
#
include <arpa/inet.h>
#endif
CAF_PUSH_WARNINGS
...
...
@@ -25,15 +25,13 @@ CAF_END_TYPE_ID_BLOCK(protobuf_example)
namespace
{
using
namespace
std
;
using
namespace
caf
;
using
namespace
caf
::
io
;
// utility function to print an exit message with custom name
void
print_on_exit
(
scheduled_actor
*
self
,
const
std
::
string
&
name
)
{
self
->
attach_functor
([
=
](
const
error
&
reason
)
{
aout
(
self
)
<<
name
<<
" exited: "
<<
to_string
(
reason
)
<<
endl
;
aout
(
self
)
<<
name
<<
" exited: "
<<
to_string
(
reason
)
<<
std
::
endl
;
});
}
...
...
@@ -43,14 +41,16 @@ struct ping_state {
behavior
ping
(
stateful_actor
<
ping_state
>*
self
,
size_t
num_pings
)
{
print_on_exit
(
self
,
"ping"
);
return
{[
=
](
kickoff_atom
,
const
actor
&
pong
)
{
self
->
send
(
pong
,
ping_atom_v
,
1
);
self
->
become
([
=
](
pong_atom
,
int
value
)
->
message
{
if
(
++
(
self
->
state
.
count
)
>=
num_pings
)
self
->
quit
();
return
make_message
(
ping_atom_v
,
value
+
1
);
});
}};
return
{
[
=
](
kickoff_atom
,
const
actor
&
pong
)
{
self
->
send
(
pong
,
ping_atom_v
,
1
);
self
->
become
([
=
](
pong_atom
,
int
value
)
->
result
<
ping_atom
,
int
>
{
if
(
++
(
self
->
state
.
count
)
>=
num_pings
)
self
->
quit
();
return
{
ping_atom_v
,
value
+
1
};
});
},
};
}
behavior
pong
(
event_based_actor
*
self
)
{
...
...
@@ -62,44 +62,43 @@ behavior pong(event_based_actor* self) {
void
protobuf_io
(
broker
*
self
,
connection_handle
hdl
,
const
actor
&
buddy
)
{
print_on_exit
(
self
,
"protobuf_io"
);
aout
(
self
)
<<
"protobuf broker started"
<<
endl
;
aout
(
self
)
<<
"protobuf broker started"
<<
std
::
endl
;
self
->
monitor
(
buddy
);
self
->
set_down_handler
(
[
=
](
const
down_msg
&
dm
)
{
if
(
dm
.
source
==
buddy
)
{
aout
(
self
)
<<
"our buddy is down"
<<
endl
;
self
->
quit
(
dm
.
reason
);
}
});
auto
write
=
[
=
](
const
org
::
libcppa
::
PingOrPong
&
p
)
{
string
buf
=
p
.
SerializeAsString
();
self
->
set_down_handler
([
=
](
const
down_msg
&
dm
)
{
if
(
dm
.
source
==
buddy
)
{
aout
(
self
)
<<
"our buddy is down"
<<
std
::
endl
;
self
->
quit
(
dm
.
reason
);
}
});
auto
write
=
[
=
](
const
org
::
caf
::
PingOrPong
&
p
)
{
std
::
string
buf
=
p
.
SerializeAsString
();
auto
s
=
htonl
(
static_cast
<
uint32_t
>
(
buf
.
size
()));
self
->
write
(
hdl
,
sizeof
(
uint32_t
),
&
s
);
self
->
write
(
hdl
,
buf
.
size
(),
buf
.
data
());
self
->
flush
(
hdl
);
};
message_handler
default_bhvr
=
{
auto
default_callbacks
=
message_handler
{
[
=
](
const
connection_closed_msg
&
)
{
aout
(
self
)
<<
"connection closed"
<<
endl
;
aout
(
self
)
<<
"connection closed"
<<
std
::
endl
;
self
->
send_exit
(
buddy
,
exit_reason
::
remote_link_unreachable
);
self
->
quit
(
exit_reason
::
remote_link_unreachable
);
},
[
=
](
ping_atom
,
int
i
)
{
aout
(
self
)
<<
"'ping' "
<<
i
<<
endl
;
org
::
libcppa
::
PingOrPong
p
;
aout
(
self
)
<<
"'ping' "
<<
i
<<
std
::
endl
;
org
::
caf
::
PingOrPong
p
;
p
.
mutable_ping
()
->
set_id
(
i
);
write
(
p
);
},
[
=
](
pong_atom
,
int
i
)
{
aout
(
self
)
<<
"'pong' "
<<
i
<<
endl
;
org
::
libcppa
::
PingOrPong
p
;
aout
(
self
)
<<
"'pong' "
<<
i
<<
std
::
endl
;
org
::
caf
::
PingOrPong
p
;
p
.
mutable_pong
()
->
set_id
(
i
);
write
(
p
);
}
}
,
};
auto
await_protobuf_data
=
message_handler
{
[
=
](
const
new_data_msg
&
msg
)
{
org
::
libcppa
::
PingOrPong
p
;
org
::
caf
::
PingOrPong
p
;
p
.
ParseFromArray
(
msg
.
buf
.
data
(),
static_cast
<
int
>
(
msg
.
buf
.
size
()));
if
(
p
.
has_ping
())
{
self
->
send
(
buddy
,
ping_atom_v
,
p
.
ping
().
id
());
...
...
@@ -109,20 +108,20 @@ void protobuf_io(broker* self, connection_handle hdl, const actor& buddy) {
}
else
{
self
->
quit
(
exit_reason
::
user_shutdown
);
cerr
<<
"neither Ping nor Pong!"
<<
endl
;
std
::
cerr
<<
"neither Ping nor Pong!"
<<
std
::
endl
;
}
// receive next length prefix
self
->
configure_read
(
hdl
,
receive_policy
::
exactly
(
sizeof
(
uint32_t
)));
self
->
unbecome
();
}
}.
or_else
(
default_
bhvr
);
}
,
}.
or_else
(
default_
callbacks
);
auto
await_length_prefix
=
message_handler
{
[
=
](
const
new_data_msg
&
msg
)
{
uint32_t
num_bytes
;
memcpy
(
&
num_bytes
,
msg
.
buf
.
data
(),
sizeof
(
uint32_t
));
num_bytes
=
htonl
(
num_bytes
);
if
(
num_bytes
>
(
1024
*
1024
))
{
aout
(
self
)
<<
"someone is trying something nasty"
<<
endl
;
aout
(
self
)
<<
"someone is trying something nasty"
<<
std
::
endl
;
self
->
quit
(
exit_reason
::
user_shutdown
);
return
;
}
...
...
@@ -130,8 +129,8 @@ void protobuf_io(broker* self, connection_handle hdl, const actor& buddy) {
auto
nb
=
static_cast
<
size_t
>
(
num_bytes
);
self
->
configure_read
(
hdl
,
receive_policy
::
exactly
(
nb
));
self
->
become
(
keep_behavior
,
await_protobuf_data
);
}
}.
or_else
(
default_
bhvr
);
}
,
}.
or_else
(
default_
callbacks
);
// initial setup
self
->
configure_read
(
hdl
,
receive_policy
::
exactly
(
sizeof
(
uint32_t
)));
self
->
become
(
await_length_prefix
);
...
...
@@ -139,14 +138,14 @@ void protobuf_io(broker* self, connection_handle hdl, const actor& buddy) {
behavior
server
(
broker
*
self
,
const
actor
&
buddy
)
{
print_on_exit
(
self
,
"server"
);
aout
(
self
)
<<
"server is running"
<<
endl
;
aout
(
self
)
<<
"server is running"
<<
std
::
endl
;
return
{
[
=
](
const
new_connection_msg
&
msg
)
{
aout
(
self
)
<<
"server accepted new connection"
<<
endl
;
aout
(
self
)
<<
"server accepted new connection"
<<
std
::
endl
;
auto
io_actor
=
self
->
fork
(
protobuf_io
,
msg
.
handle
,
buddy
);
// only accept 1 connection in our example
self
->
quit
();
}
}
,
};
}
...
...
@@ -158,30 +157,30 @@ public:
config
()
{
opt_group
{
custom_options_
,
"global"
}
.
add
(
port
,
"port,p"
,
"set port"
)
.
add
(
host
,
"host,H"
,
"set host (ignored in server mode)"
)
.
add
(
server_mode
,
"server-mode,s"
,
"enable server mode"
);
.
add
(
port
,
"port,p"
,
"set port"
)
.
add
(
host
,
"host,H"
,
"set host (ignored in server mode)"
)
.
add
(
server_mode
,
"server-mode,s"
,
"enable server mode"
);
}
};
void
run_server
(
actor_system
&
system
,
const
config
&
cfg
)
{
cout
<<
"run in server mode"
<<
endl
;
std
::
cout
<<
"run in server mode"
<<
std
::
endl
;
auto
pong_actor
=
system
.
spawn
(
pong
);
auto
server_actor
=
system
.
middleman
().
spawn_server
(
server
,
cfg
.
port
,
pong_actor
);
if
(
!
server_actor
)
cerr
<<
"unable to spawn server: "
<<
to_string
(
server_actor
.
error
())
<<
endl
;
std
::
cerr
<<
"unable to spawn server: "
<<
to_string
(
server_actor
.
error
())
<<
std
::
endl
;
}
void
run_client
(
actor_system
&
system
,
const
config
&
cfg
)
{
cout
<<
"run in client mode"
<<
endl
;
std
::
cout
<<
"run in client mode"
<<
std
::
endl
;
auto
ping_actor
=
system
.
spawn
(
ping
,
20u
);
auto
io_actor
=
system
.
middleman
().
spawn_client
(
protobuf_io
,
cfg
.
host
,
cfg
.
port
,
ping_actor
);
if
(
!
io_actor
)
{
cout
<<
"cannot connect to "
<<
cfg
.
host
<<
" at port "
<<
cfg
.
port
<<
": "
<<
to_string
(
io_actor
.
error
())
<<
endl
;
std
::
cout
<<
"cannot connect to "
<<
cfg
.
host
<<
" at port "
<<
cfg
.
port
<<
": "
<<
to_string
(
io_actor
.
error
())
<<
std
::
endl
;
return
;
}
send_as
(
*
io_actor
,
ping_actor
,
kickoff_atom_v
,
*
io_actor
);
...
...
examples/qtsupport/chatwidget.cpp
View file @
d7653648
...
...
@@ -75,7 +75,10 @@ void ChatWidget::sendChatMessage() {
// Ignore empty lines.
}
else
if
(
line
.
startsWith
(
'/'
))
{
vector
<
string
>
words
;
split
(
words
,
line
.
midRef
(
1
).
toUtf8
().
constData
(),
is_any_of
(
" "
));
auto
utf8
=
line
.
midRef
(
1
).
toUtf8
();
auto
sv
=
caf
::
string_view
{
utf8
.
constData
(),
static_cast
<
size_t
>
(
utf8
.
size
())};
split
(
words
,
sv
,
is_any_of
(
" "
));
if
(
words
.
size
()
==
3
&&
words
[
0
]
==
"join"
)
{
if
(
auto
x
=
system
().
groups
().
get
(
words
[
1
],
words
[
2
]))
send_as
(
as_actor
(),
as_actor
(),
join_atom_v
,
std
::
move
(
*
x
));
...
...
examples/remoting/pingpong.proto
View file @
d7653648
package
org
.
libcppa
;
syntax
=
"proto2"
;
package
org
.
caf
;
message
Ping
{
required
int32
id
=
1
;
...
...
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