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
4d4ca4cd
Commit
4d4ca4cd
authored
Mar 31, 2020
by
Dominik Charousset
Committed by
GitHub
Mar 31, 2020
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #65
Port message-rework changes to incubator
parents
f5b0bf3e
2bc60f68
Changes
14
Show whitespace changes
Inline
Side-by-side
Showing
14 changed files
with
26 additions
and
29 deletions
+26
-29
libcaf_net/caf/net/basp/application.hpp
libcaf_net/caf/net/basp/application.hpp
+1
-2
libcaf_net/caf/net/endpoint_manager.hpp
libcaf_net/caf/net/endpoint_manager.hpp
+1
-2
libcaf_net/src/application.cpp
libcaf_net/src/application.cpp
+2
-3
libcaf_net/src/host.cpp
libcaf_net/src/host.cpp
+0
-1
libcaf_net/src/multiplexer.cpp
libcaf_net/src/multiplexer.cpp
+2
-0
libcaf_net/src/pipe_socket.cpp
libcaf_net/src/pipe_socket.cpp
+1
-1
libcaf_net/src/udp_datagram_socket.cpp
libcaf_net/src/udp_datagram_socket.cpp
+1
-0
libcaf_net/test/datagram_transport.cpp
libcaf_net/test/datagram_transport.cpp
+2
-3
libcaf_net/test/doorman.cpp
libcaf_net/test/doorman.cpp
+3
-3
libcaf_net/test/endpoint_manager.cpp
libcaf_net/test/endpoint_manager.cpp
+4
-3
libcaf_net/test/stream_transport.cpp
libcaf_net/test/stream_transport.cpp
+3
-4
libcaf_net/test/string_application.cpp
libcaf_net/test/string_application.cpp
+3
-3
libcaf_net/test/transport_worker.cpp
libcaf_net/test/transport_worker.cpp
+2
-2
libcaf_net/test/transport_worker_dispatcher.cpp
libcaf_net/test/transport_worker_dispatcher.cpp
+1
-2
No files found.
libcaf_net/caf/net/basp/application.hpp
View file @
4d4ca4cd
...
...
@@ -125,8 +125,7 @@ public:
// nop
}
static
expected
<
buffer_type
>
serialize
(
actor_system
&
sys
,
const
type_erased_tuple
&
x
);
static
expected
<
buffer_type
>
serialize
(
actor_system
&
sys
,
const
message
&
x
);
// -- utility functions ------------------------------------------------------
...
...
libcaf_net/caf/net/endpoint_manager.hpp
View file @
4d4ca4cd
...
...
@@ -48,8 +48,7 @@ public:
using
maybe_buffer
=
expected
<
std
::
vector
<
byte
>>
;
/// A function type for serializing message payloads.
using
serialize_fun_type
=
maybe_buffer
(
*
)(
actor_system
&
,
const
type_erased_tuple
&
);
using
serialize_fun_type
=
maybe_buffer
(
*
)(
actor_system
&
,
const
message
&
);
// -- constructors, destructors, and assignment operators --------------------
...
...
libcaf_net/src/application.cpp
View file @
4d4ca4cd
...
...
@@ -39,7 +39,6 @@
#include "caf/sec.hpp"
#include "caf/send.hpp"
#include "caf/string_algorithms.hpp"
#include "caf/type_erased_tuple.hpp"
namespace
caf
::
net
::
basp
{
...
...
@@ -120,10 +119,10 @@ void application::local_actor_down(packet_writer& writer, actor_id id,
}
expected
<
std
::
vector
<
byte
>>
application
::
serialize
(
actor_system
&
sys
,
const
type_erased_tupl
e
&
x
)
{
const
messag
e
&
x
)
{
std
::
vector
<
byte
>
result
;
binary_serializer
sink
{
sys
,
result
};
if
(
auto
err
=
message
::
save
(
sink
,
x
))
if
(
auto
err
=
x
.
save
(
sink
))
return
err
.
value
();
return
result
;
}
...
...
libcaf_net/src/host.cpp
View file @
4d4ca4cd
...
...
@@ -22,7 +22,6 @@
#include "caf/detail/net_syscall.hpp"
#include "caf/detail/socket_sys_includes.hpp"
#include "caf/error.hpp"
#include "caf/make_message.hpp"
#include "caf/message.hpp"
#include "caf/net/socket.hpp"
#include "caf/none.hpp"
...
...
libcaf_net/src/multiplexer.cpp
View file @
4d4ca4cd
...
...
@@ -25,10 +25,12 @@
#include "caf/error.hpp"
#include "caf/expected.hpp"
#include "caf/logger.hpp"
#include "caf/make_counted.hpp"
#include "caf/net/operation.hpp"
#include "caf/net/pollset_updater.hpp"
#include "caf/net/socket_manager.hpp"
#include "caf/sec.hpp"
#include "caf/span.hpp"
#include "caf/variant.hpp"
#ifndef CAF_WINDOWS
...
...
libcaf_net/src/pipe_socket.cpp
View file @
4d4ca4cd
...
...
@@ -26,10 +26,10 @@
#include "caf/detail/socket_sys_aliases.hpp"
#include "caf/detail/socket_sys_includes.hpp"
#include "caf/expected.hpp"
#include "caf/make_message.hpp"
#include "caf/message.hpp"
#include "caf/net/stream_socket.hpp"
#include "caf/sec.hpp"
#include "caf/span.hpp"
#include "caf/variant.hpp"
namespace
caf
::
net
{
...
...
libcaf_net/src/udp_datagram_socket.cpp
View file @
4d4ca4cd
...
...
@@ -27,6 +27,7 @@
#include "caf/ip_endpoint.hpp"
#include "caf/logger.hpp"
#include "caf/net/socket_guard.hpp"
#include "caf/span.hpp"
namespace
caf
::
net
{
...
...
libcaf_net/test/datagram_transport.cpp
View file @
4d4ca4cd
...
...
@@ -166,11 +166,10 @@ public:
CAF_FAIL
(
"handle_error called: "
<<
to_string
(
sec
));
}
static
expected
<
buffer_type
>
serialize
(
actor_system
&
sys
,
const
type_erased_tuple
&
x
)
{
static
expected
<
buffer_type
>
serialize
(
actor_system
&
sys
,
const
message
&
x
)
{
buffer_type
result
;
binary_serializer
sink
{
sys
,
result
};
if
(
auto
err
=
message
::
save
(
sink
,
x
))
if
(
auto
err
=
x
.
save
(
sink
))
return
err
.
value
();
return
result
;
}
...
...
libcaf_net/test/doorman.cpp
View file @
4d4ca4cd
...
...
@@ -61,10 +61,10 @@ struct fixture : test_coordinator_fixture<>, host_fixture {
class
dummy_application
{
public:
static
expected
<
std
::
vector
<
byte
>>
serialize
(
actor_system
&
sys
,
const
type_erased_tupl
e
&
x
)
{
const
messag
e
&
x
)
{
std
::
vector
<
byte
>
result
;
binary_serializer
sink
{
sys
,
result
};
if
(
auto
err
=
message
::
save
(
sink
,
x
))
if
(
auto
err
=
x
.
save
(
sink
))
return
err
.
value
();
return
result
;
}
...
...
@@ -117,7 +117,7 @@ public:
using
application_type
=
dummy_application
;
static
expected
<
std
::
vector
<
byte
>>
serialize
(
actor_system
&
sys
,
const
type_erased_tupl
e
&
x
)
{
const
messag
e
&
x
)
{
return
dummy_application
::
serialize
(
sys
,
x
);
}
...
...
libcaf_net/test/endpoint_manager.cpp
View file @
4d4ca4cd
...
...
@@ -31,6 +31,7 @@
#include "caf/net/make_endpoint_manager.hpp"
#include "caf/net/multiplexer.hpp"
#include "caf/net/stream_socket.hpp"
#include "caf/node_id.hpp"
#include "caf/span.hpp"
using
namespace
caf
;
...
...
@@ -62,10 +63,10 @@ struct fixture : test_coordinator_fixture<>, host_fixture {
class
dummy_application
{
public:
static
expected
<
std
::
vector
<
byte
>>
serialize
(
actor_system
&
sys
,
const
type_erased_tupl
e
&
x
)
{
const
messag
e
&
x
)
{
std
::
vector
<
byte
>
result
;
binary_serializer
sink
{
sys
,
result
};
if
(
auto
err
=
message
::
save
(
sink
,
x
))
if
(
auto
err
=
x
.
save
(
sink
))
return
err
.
value
();
return
result
;
}
...
...
@@ -124,7 +125,7 @@ public:
template
<
class
Manager
>
void
resolve
(
Manager
&
mgr
,
const
uri
&
locator
,
const
actor
&
listener
)
{
actor_id
aid
=
42
;
auto
hid
=
"0011223344556677889900112233445566778899"
;
auto
hid
=
string_view
(
"0011223344556677889900112233445566778899"
)
;
auto
nid
=
unbox
(
make_node_id
(
42
,
hid
));
actor_config
cfg
;
auto
p
=
make_actor
<
actor_proxy_impl
,
strong_actor_ptr
>
(
aid
,
nid
,
...
...
libcaf_net/test/stream_transport.cpp
View file @
4d4ca4cd
...
...
@@ -106,7 +106,7 @@ public:
template
<
class
Parent
>
void
resolve
(
Parent
&
parent
,
string_view
path
,
const
actor
&
listener
)
{
actor_id
aid
=
42
;
auto
hid
=
"0011223344556677889900112233445566778899"
;
auto
hid
=
string_view
(
"0011223344556677889900112233445566778899"
)
;
auto
nid
=
unbox
(
make_node_id
(
42
,
hid
));
actor_config
cfg
;
endpoint_manager_ptr
ptr
{
&
parent
.
manager
()};
...
...
@@ -137,11 +137,10 @@ public:
// nop
}
static
expected
<
buffer_type
>
serialize
(
actor_system
&
sys
,
const
type_erased_tuple
&
x
)
{
static
expected
<
buffer_type
>
serialize
(
actor_system
&
sys
,
const
message
&
x
)
{
buffer_type
result
;
binary_serializer
sink
{
sys
,
result
};
if
(
auto
err
=
message
::
save
(
sink
,
x
))
if
(
auto
err
=
x
.
save
(
sink
))
return
err
.
value
();
return
result
;
}
...
...
libcaf_net/test/string_application.cpp
View file @
4d4ca4cd
...
...
@@ -113,10 +113,10 @@ public:
}
static
expected
<
std
::
vector
<
byte
>>
serialize
(
actor_system
&
sys
,
const
type_erased_tupl
e
&
x
)
{
const
messag
e
&
x
)
{
std
::
vector
<
byte
>
result
;
binary_serializer
sink
{
sys
,
result
};
if
(
auto
err
=
message
::
save
(
sink
,
x
))
if
(
auto
err
=
x
.
save
(
sink
))
return
err
.
value
();
return
result
;
}
...
...
@@ -168,7 +168,7 @@ public:
template
<
class
Parent
>
void
resolve
(
Parent
&
parent
,
string_view
path
,
actor
listener
)
{
actor_id
aid
=
42
;
auto
hid
=
"0011223344556677889900112233445566778899"
;
auto
hid
=
string_view
(
"0011223344556677889900112233445566778899"
)
;
auto
nid
=
unbox
(
make_node_id
(
aid
,
hid
));
actor_config
cfg
;
auto
sys
=
&
parent
.
system
();
...
...
libcaf_net/test/transport_worker.cpp
View file @
4d4ca4cd
...
...
@@ -103,10 +103,10 @@ public:
}
static
expected
<
std
::
vector
<
byte
>>
serialize
(
actor_system
&
sys
,
const
type_erased_tupl
e
&
x
)
{
const
messag
e
&
x
)
{
std
::
vector
<
byte
>
result
;
binary_serializer
sink
{
sys
,
result
};
if
(
auto
err
=
message
::
save
(
sink
,
x
))
if
(
auto
err
=
x
.
save
(
sink
))
return
err
.
value
();
return
result
;
}
...
...
libcaf_net/test/transport_worker_dispatcher.cpp
View file @
4d4ca4cd
...
...
@@ -92,8 +92,7 @@ public:
rec_buf_
->
push_back
(
static_cast
<
byte
>
(
id_
));
}
static
expected
<
buffer_type
>
serialize
(
actor_system
&
,
const
type_erased_tuple
&
)
{
static
expected
<
buffer_type
>
serialize
(
actor_system
&
,
const
message
&
)
{
return
buffer_type
{};
}
...
...
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