Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
A
actor-incubator
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
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-incubator
Commits
ba13aad9
Unverified
Commit
ba13aad9
authored
Nov 20, 2019
by
Dominik Charousset
Committed by
GitHub
Nov 20, 2019
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #45
Refactor nested to concatenated namespaces
parents
48099efc
dd249e2b
Changes
74
Hide whitespace changes
Inline
Side-by-side
Showing
74 changed files
with
167 additions
and
358 deletions
+167
-358
cmake/caf-generate-enum-strings.cpp
cmake/caf-generate-enum-strings.cpp
+12
-1
cmake/get_compiler_version.cpp
cmake/get_compiler_version.cpp
+0
-17
libcaf_bb/caf/bb/container_source.hpp
libcaf_bb/caf/bb/container_source.hpp
+2
-4
libcaf_bb/caf/bb/stream_reader.hpp
libcaf_bb/caf/bb/stream_reader.hpp
+2
-4
libcaf_bb/caf/policy/tokenized_integer_reader.hpp
libcaf_bb/caf/policy/tokenized_integer_reader.hpp
+2
-4
libcaf_bb/test/container_source.cpp
libcaf_bb/test/container_source.cpp
+3
-3
libcaf_bb/test/stream_reader.cpp
libcaf_bb/test/stream_reader.cpp
+12
-12
libcaf_net/caf/detail/convert_ip_endpoint.hpp
libcaf_net/caf/detail/convert_ip_endpoint.hpp
+2
-4
libcaf_net/caf/detail/sockaddr_members.hpp
libcaf_net/caf/detail/sockaddr_members.hpp
+2
-4
libcaf_net/caf/detail/socket_sys_aliases.hpp
libcaf_net/caf/detail/socket_sys_aliases.hpp
+2
-4
libcaf_net/caf/net/actor_proxy_impl.hpp
libcaf_net/caf/net/actor_proxy_impl.hpp
+2
-4
libcaf_net/caf/net/backend/test.hpp
libcaf_net/caf/net/backend/test.hpp
+2
-6
libcaf_net/caf/net/basp/application.hpp
libcaf_net/caf/net/basp/application.hpp
+2
-6
libcaf_net/caf/net/basp/connection_state.hpp
libcaf_net/caf/net/basp/connection_state.hpp
+2
-6
libcaf_net/caf/net/basp/constants.hpp
libcaf_net/caf/net/basp/constants.hpp
+2
-6
libcaf_net/caf/net/basp/ec.hpp
libcaf_net/caf/net/basp/ec.hpp
+2
-6
libcaf_net/caf/net/basp/header.hpp
libcaf_net/caf/net/basp/header.hpp
+2
-6
libcaf_net/caf/net/basp/message_queue.hpp
libcaf_net/caf/net/basp/message_queue.hpp
+2
-6
libcaf_net/caf/net/basp/message_type.hpp
libcaf_net/caf/net/basp/message_type.hpp
+2
-6
libcaf_net/caf/net/basp/remote_message_handler.hpp
libcaf_net/caf/net/basp/remote_message_handler.hpp
+2
-6
libcaf_net/caf/net/basp/worker.hpp
libcaf_net/caf/net/basp/worker.hpp
+2
-6
libcaf_net/caf/net/datagram_socket.hpp
libcaf_net/caf/net/datagram_socket.hpp
+2
-4
libcaf_net/caf/net/defaults.hpp
libcaf_net/caf/net/defaults.hpp
+2
-8
libcaf_net/caf/net/endpoint_manager.hpp
libcaf_net/caf/net/endpoint_manager.hpp
+2
-4
libcaf_net/caf/net/endpoint_manager_impl.hpp
libcaf_net/caf/net/endpoint_manager_impl.hpp
+2
-4
libcaf_net/caf/net/endpoint_manager_queue.hpp
libcaf_net/caf/net/endpoint_manager_queue.hpp
+2
-4
libcaf_net/caf/net/host.hpp
libcaf_net/caf/net/host.hpp
+2
-4
libcaf_net/caf/net/ip.hpp
libcaf_net/caf/net/ip.hpp
+2
-6
libcaf_net/caf/net/make_endpoint_manager.hpp
libcaf_net/caf/net/make_endpoint_manager.hpp
+2
-4
libcaf_net/caf/net/middleman.hpp
libcaf_net/caf/net/middleman.hpp
+2
-4
libcaf_net/caf/net/middleman_backend.hpp
libcaf_net/caf/net/middleman_backend.hpp
+2
-4
libcaf_net/caf/net/multiplexer.hpp
libcaf_net/caf/net/multiplexer.hpp
+2
-4
libcaf_net/caf/net/network_socket.hpp
libcaf_net/caf/net/network_socket.hpp
+2
-4
libcaf_net/caf/net/operation.hpp
libcaf_net/caf/net/operation.hpp
+2
-4
libcaf_net/caf/net/packet_writer.hpp
libcaf_net/caf/net/packet_writer.hpp
+2
-4
libcaf_net/caf/net/packet_writer_decorator.hpp
libcaf_net/caf/net/packet_writer_decorator.hpp
+2
-4
libcaf_net/caf/net/pipe_socket.hpp
libcaf_net/caf/net/pipe_socket.hpp
+2
-4
libcaf_net/caf/net/pollset_updater.hpp
libcaf_net/caf/net/pollset_updater.hpp
+2
-4
libcaf_net/caf/net/receive_policy.hpp
libcaf_net/caf/net/receive_policy.hpp
+2
-4
libcaf_net/caf/net/socket.hpp
libcaf_net/caf/net/socket.hpp
+2
-4
libcaf_net/caf/net/socket_guard.hpp
libcaf_net/caf/net/socket_guard.hpp
+2
-4
libcaf_net/caf/net/socket_id.hpp
libcaf_net/caf/net/socket_id.hpp
+2
-4
libcaf_net/caf/net/socket_manager.hpp
libcaf_net/caf/net/socket_manager.hpp
+2
-4
libcaf_net/caf/net/stream_socket.hpp
libcaf_net/caf/net/stream_socket.hpp
+2
-4
libcaf_net/caf/net/tcp_accept_socket.hpp
libcaf_net/caf/net/tcp_accept_socket.hpp
+2
-4
libcaf_net/caf/net/tcp_stream_socket.hpp
libcaf_net/caf/net/tcp_stream_socket.hpp
+2
-4
libcaf_net/caf/net/udp_datagram_socket.hpp
libcaf_net/caf/net/udp_datagram_socket.hpp
+2
-4
libcaf_net/src/actor_proxy_impl.cpp
libcaf_net/src/actor_proxy_impl.cpp
+2
-4
libcaf_net/src/application.cpp
libcaf_net/src/application.cpp
+2
-6
libcaf_net/src/convert_ip_endpoint.cpp
libcaf_net/src/convert_ip_endpoint.cpp
+2
-4
libcaf_net/src/datagram_socket.cpp
libcaf_net/src/datagram_socket.cpp
+2
-4
libcaf_net/src/defaults.cpp
libcaf_net/src/defaults.cpp
+2
-8
libcaf_net/src/ec.cpp
libcaf_net/src/ec.cpp
+2
-6
libcaf_net/src/endpoint_manager.cpp
libcaf_net/src/endpoint_manager.cpp
+2
-4
libcaf_net/src/header.cpp
libcaf_net/src/header.cpp
+2
-6
libcaf_net/src/host.cpp
libcaf_net/src/host.cpp
+2
-4
libcaf_net/src/ip.cpp
libcaf_net/src/ip.cpp
+2
-6
libcaf_net/src/message_queue.cpp
libcaf_net/src/message_queue.cpp
+2
-6
libcaf_net/src/multiplexer.cpp
libcaf_net/src/multiplexer.cpp
+2
-4
libcaf_net/src/net/backend/test.cpp
libcaf_net/src/net/backend/test.cpp
+2
-6
libcaf_net/src/net/endpoint_manager_queue.cpp
libcaf_net/src/net/endpoint_manager_queue.cpp
+2
-4
libcaf_net/src/net/middleman.cpp
libcaf_net/src/net/middleman.cpp
+2
-4
libcaf_net/src/net/middleman_backend.cpp
libcaf_net/src/net/middleman_backend.cpp
+2
-4
libcaf_net/src/net/packet_writer.cpp
libcaf_net/src/net/packet_writer.cpp
+2
-4
libcaf_net/src/network_socket.cpp
libcaf_net/src/network_socket.cpp
+2
-5
libcaf_net/src/pipe_socket.cpp
libcaf_net/src/pipe_socket.cpp
+2
-4
libcaf_net/src/pollset_updater.cpp
libcaf_net/src/pollset_updater.cpp
+2
-4
libcaf_net/src/socket.cpp
libcaf_net/src/socket.cpp
+2
-4
libcaf_net/src/socket_manager.cpp
libcaf_net/src/socket_manager.cpp
+2
-4
libcaf_net/src/stream_socket.cpp
libcaf_net/src/stream_socket.cpp
+2
-4
libcaf_net/src/tcp_accept_socket.cpp
libcaf_net/src/tcp_accept_socket.cpp
+2
-4
libcaf_net/src/tcp_stream_socket.cpp
libcaf_net/src/tcp_stream_socket.cpp
+2
-4
libcaf_net/src/udp_datagram_socket.cpp
libcaf_net/src/udp_datagram_socket.cpp
+2
-4
libcaf_net/src/worker.cpp
libcaf_net/src/worker.cpp
+2
-6
No files found.
cmake/caf-generate-enum-strings.cpp
View file @
ba13aad9
...
@@ -11,6 +11,17 @@ using std::find_if;
...
@@ -11,6 +11,17 @@ using std::find_if;
using
std
::
string
;
using
std
::
string
;
using
std
::
vector
;
using
std
::
vector
;
void
split
(
const
string
&
str
,
const
string
&
separator
,
vector
<
string
>&
dest
)
{
size_t
current
,
previous
=
0
;
current
=
str
.
find
(
separator
);
while
(
current
!=
std
::
string
::
npos
)
{
dest
.
emplace_back
(
str
.
substr
(
previous
,
current
-
previous
));
previous
=
current
+
separator
.
size
();
current
=
str
.
find
(
separator
,
previous
);
}
dest
.
push_back
(
str
.
substr
(
previous
,
current
-
previous
));
}
void
trim
(
string
&
str
)
{
void
trim
(
string
&
str
)
{
auto
not_space
=
[](
char
c
)
{
return
isspace
(
c
)
==
0
;
};
auto
not_space
=
[](
char
c
)
{
return
isspace
(
c
)
==
0
;
};
str
.
erase
(
str
.
begin
(),
find_if
(
str
.
begin
(),
str
.
end
(),
not_space
));
str
.
erase
(
str
.
begin
(),
find_if
(
str
.
begin
(),
str
.
end
(),
not_space
));
...
@@ -71,7 +82,7 @@ int main(int argc, char** argv) {
...
@@ -71,7 +82,7 @@ int main(int argc, char** argv) {
line
.
pop_back
();
line
.
pop_back
();
line
.
erase
(
line
.
begin
(),
find
(
line
.
begin
(),
line
.
end
(),
' '
));
line
.
erase
(
line
.
begin
(),
find
(
line
.
begin
(),
line
.
end
(),
' '
));
trim
(
line
);
trim
(
line
);
namespaces
.
emplace_back
(
line
);
split
(
line
,
"::"
,
namespaces
);
}
}
}
}
// Sanity checking.
// Sanity checking.
...
...
cmake/get_compiler_version.cpp
deleted
100644 → 0
View file @
48099efc
#include <iostream>
using
namespace
std
;
int
main
()
{
# ifdef __clang__
cout
<<
__clang_major__
<<
"."
<<
__clang_minor__
;
# elif defined(__GNUC__)
cout
<<
__GNUC__
<<
"."
<<
__GNUC_MINOR__
;
# else
cout
<<
"0.0"
;
# endif
return
0
;
}
libcaf_bb/caf/bb/container_source.hpp
View file @
ba13aad9
...
@@ -26,8 +26,7 @@
...
@@ -26,8 +26,7 @@
#include "caf/stateful_actor.hpp"
#include "caf/stateful_actor.hpp"
#include "caf/unit.hpp"
#include "caf/unit.hpp"
namespace
caf
{
namespace
caf
::
bb
{
namespace
bb
{
/// @relates container_source
/// @relates container_source
template
<
class
Container
>
template
<
class
Container
>
...
@@ -98,5 +97,4 @@ behavior container_source(container_source_type<Container>* self, Container xs,
...
@@ -98,5 +97,4 @@ behavior container_source(container_source_type<Container>* self, Container xs,
/// Convenience function for spawning container sources.
/// Convenience function for spawning container sources.
}
// namespace bb
}
// namespace caf::bb
}
// namespace caf
libcaf_bb/caf/bb/stream_reader.hpp
View file @
ba13aad9
...
@@ -27,8 +27,7 @@
...
@@ -27,8 +27,7 @@
#include "caf/string_algorithms.hpp"
#include "caf/string_algorithms.hpp"
#include "caf/unit.hpp"
#include "caf/unit.hpp"
namespace
caf
{
namespace
caf
::
bb
{
namespace
bb
{
/// @relates stream_reader
/// @relates stream_reader
template
<
class
InputStream
>
template
<
class
InputStream
>
...
@@ -99,5 +98,4 @@ void stream_reader(stream_source_type<InputStream>* self,
...
@@ -99,5 +98,4 @@ void stream_reader(stream_source_type<InputStream>* self,
unit
(
src
.
ptr
()
->
add_outbound_path
(
sinks
)...);
unit
(
src
.
ptr
()
->
add_outbound_path
(
sinks
)...);
}
}
}
// namespace bb
}
// namespace caf::bb
}
// namespace caf
libcaf_bb/caf/policy/tokenized_integer_reader.hpp
View file @
ba13aad9
...
@@ -30,8 +30,7 @@
...
@@ -30,8 +30,7 @@
#include "caf/string_algorithms.hpp"
#include "caf/string_algorithms.hpp"
#include "caf/unit.hpp"
#include "caf/unit.hpp"
namespace
caf
{
namespace
caf
::
policy
{
namespace
policy
{
/// Parses whitespace-separated integers from input strings to 'ValueType' and
/// Parses whitespace-separated integers from input strings to 'ValueType' and
/// pushes generated integers to a downstream.
/// pushes generated integers to a downstream.
...
@@ -72,5 +71,4 @@ public:
...
@@ -72,5 +71,4 @@ public:
}
}
};
};
}
// namespace policy
}
// namespace caf::policy
}
// namespace caf
libcaf_bb/test/container_source.cpp
View file @
ba13aad9
...
@@ -102,9 +102,9 @@ CAF_TEST(stream_to_sinks) {
...
@@ -102,9 +102,9 @@ CAF_TEST(stream_to_sinks) {
auto
snk1
=
sys
.
spawn
(
container_sink
);
auto
snk1
=
sys
.
spawn
(
container_sink
);
auto
snk2
=
sys
.
spawn
(
container_sink
);
auto
snk2
=
sys
.
spawn
(
container_sink
);
auto
snk3
=
sys
.
spawn
(
container_sink
);
auto
snk3
=
sys
.
spawn
(
container_sink
);
auto
src
auto
src
=
sys
=
sys
.
spawn
(
bb
::
container_source
<
container_type
,
actor
,
actor
,
actor
>
,
.
spawn
(
bb
::
container_source
<
container_type
,
actor
,
actor
,
actor
>
,
test_container
,
snk1
,
snk2
,
snk3
);
test_container
,
snk1
,
snk2
,
snk3
);
auto
mon
=
sys
.
spawn
(
container_monitor
);
auto
mon
=
sys
.
spawn
(
container_monitor
);
self
->
send
(
mon
,
join_atom
::
value
,
src
);
self
->
send
(
mon
,
join_atom
::
value
,
src
);
run
();
run
();
...
...
libcaf_bb/test/stream_reader.cpp
View file @
ba13aad9
...
@@ -104,10 +104,10 @@ CAF_TEST(stream_to_sink) {
...
@@ -104,10 +104,10 @@ CAF_TEST(stream_to_sink) {
std
::
vector
<
value_type
>
test_container
{
1
,
2
,
3
,
4
,
5
,
6
,
7
,
78
,
std
::
vector
<
value_type
>
test_container
{
1
,
2
,
3
,
4
,
5
,
6
,
7
,
78
,
1254
,
1
,
20
,
4
,
56
,
78
,
95
};
1254
,
1
,
20
,
4
,
56
,
78
,
95
};
auto
sink
=
sys
.
spawn
(
stream_reader_sink
);
auto
sink
=
sys
.
spawn
(
stream_reader_sink
);
auto
src
auto
src
=
sys
.
spawn
(
bb
::
stream_reader
<
=
sys
.
spawn
(
bb
::
stream_reader
<
policy
::
tokenized_integer_reader
<
value_type
>
,
policy
::
tokenized_integer_reader
<
value_type
>
,
stream_type
,
actor
>
,
stream_type
,
actor
>
,
std
::
move
(
ptr_test_stream
),
sink
);
std
::
move
(
ptr_test_stream
),
sink
);
auto
mon
=
sys
.
spawn
(
stream_monitor
);
auto
mon
=
sys
.
spawn
(
stream_monitor
);
self
->
send
(
mon
,
join_atom
::
value
,
src
);
self
->
send
(
mon
,
join_atom
::
value
,
src
);
run
();
run
();
...
@@ -125,10 +125,10 @@ CAF_TEST(stream_to_sinks) {
...
@@ -125,10 +125,10 @@ CAF_TEST(stream_to_sinks) {
auto
snk1
=
sys
.
spawn
(
stream_reader_sink
);
auto
snk1
=
sys
.
spawn
(
stream_reader_sink
);
auto
snk2
=
sys
.
spawn
(
stream_reader_sink
);
auto
snk2
=
sys
.
spawn
(
stream_reader_sink
);
auto
snk3
=
sys
.
spawn
(
stream_reader_sink
);
auto
snk3
=
sys
.
spawn
(
stream_reader_sink
);
auto
src
auto
src
=
sys
.
spawn
(
bb
::
stream_reader
<
=
sys
.
spawn
(
bb
::
stream_reader
<
policy
::
tokenized_integer_reader
<
value_type
>
,
policy
::
tokenized_integer_reader
<
value_type
>
,
stream_type
,
actor
,
actor
,
actor
>
,
stream_type
,
actor
,
actor
,
actor
>
,
std
::
move
(
ptr_test_stream
),
snk1
,
snk2
,
snk3
);
std
::
move
(
ptr_test_stream
),
snk1
,
snk2
,
snk3
);
auto
mon
=
sys
.
spawn
(
stream_monitor
);
auto
mon
=
sys
.
spawn
(
stream_monitor
);
self
->
send
(
mon
,
join_atom
::
value
,
src
);
self
->
send
(
mon
,
join_atom
::
value
,
src
);
run
();
run
();
...
@@ -146,10 +146,10 @@ CAF_TEST(error_stream_to_sink) {
...
@@ -146,10 +146,10 @@ CAF_TEST(error_stream_to_sink) {
std
::
unique_ptr
<
stream_type
>
ptr_test_stream
{
std
::
unique_ptr
<
stream_type
>
ptr_test_stream
{
new
stream_type
(
test_stringvalues
)};
new
stream_type
(
test_stringvalues
)};
auto
sink
=
sys
.
spawn
(
stream_reader_sink
);
auto
sink
=
sys
.
spawn
(
stream_reader_sink
);
auto
src
auto
src
=
sys
.
spawn
(
bb
::
stream_reader
<
=
sys
.
spawn
(
bb
::
stream_reader
<
policy
::
tokenized_integer_reader
<
value_type
>
,
policy
::
tokenized_integer_reader
<
value_type
>
,
stream_type
,
actor
>
,
stream_type
,
actor
>
,
std
::
move
(
ptr_test_stream
),
sink
);
std
::
move
(
ptr_test_stream
),
sink
);
auto
mon
=
sys
.
spawn
(
stream_monitor
);
auto
mon
=
sys
.
spawn
(
stream_monitor
);
self
->
send
(
mon
,
join_atom
::
value
,
src
);
self
->
send
(
mon
,
join_atom
::
value
,
src
);
run
();
run
();
...
...
libcaf_net/caf/detail/convert_ip_endpoint.hpp
View file @
ba13aad9
...
@@ -21,12 +21,10 @@
...
@@ -21,12 +21,10 @@
#include "caf/detail/socket_sys_includes.hpp"
#include "caf/detail/socket_sys_includes.hpp"
#include "caf/fwd.hpp"
#include "caf/fwd.hpp"
namespace
caf
{
namespace
caf
::
detail
{
namespace
detail
{
void
convert
(
const
ip_endpoint
&
src
,
sockaddr_storage
&
dst
);
void
convert
(
const
ip_endpoint
&
src
,
sockaddr_storage
&
dst
);
error
convert
(
const
sockaddr_storage
&
src
,
ip_endpoint
&
dst
);
error
convert
(
const
sockaddr_storage
&
src
,
ip_endpoint
&
dst
);
}
// namespace detail
}
// namespace caf::detail
}
// namespace caf
libcaf_net/caf/detail/sockaddr_members.hpp
View file @
ba13aad9
...
@@ -20,8 +20,7 @@
...
@@ -20,8 +20,7 @@
#include "caf/detail/socket_sys_includes.hpp"
#include "caf/detail/socket_sys_includes.hpp"
namespace
caf
{
namespace
caf
::
detail
{
namespace
detail
{
inline
auto
addr_of
(
sockaddr_in
&
what
)
->
decltype
(
what
.
sin_addr
)
&
{
inline
auto
addr_of
(
sockaddr_in
&
what
)
->
decltype
(
what
.
sin_addr
)
&
{
return
what
.
sin_addr
;
return
what
.
sin_addr
;
...
@@ -47,5 +46,4 @@ inline auto port_of(sockaddr_in6& what) -> decltype(what.sin6_port)& {
...
@@ -47,5 +46,4 @@ inline auto port_of(sockaddr_in6& what) -> decltype(what.sin6_port)& {
return
what
.
sin6_port
;
return
what
.
sin6_port
;
}
}
}
// namespace detail
}
// namespace caf::detail
}
// namespace caf
libcaf_net/caf/detail/socket_sys_aliases.hpp
View file @
ba13aad9
...
@@ -20,8 +20,7 @@
...
@@ -20,8 +20,7 @@
#include "caf/config.hpp"
#include "caf/config.hpp"
namespace
caf
{
namespace
caf
::
net
{
namespace
net
{
#ifdef CAF_WINDOWS
#ifdef CAF_WINDOWS
...
@@ -41,5 +40,4 @@ using socket_size_type = unsigned;
...
@@ -41,5 +40,4 @@ using socket_size_type = unsigned;
#endif // CAF_WINDOWS
#endif // CAF_WINDOWS
}
// namespace net
}
// namespace caf::net
}
// namespace caf
libcaf_net/caf/net/actor_proxy_impl.hpp
View file @
ba13aad9
...
@@ -21,8 +21,7 @@
...
@@ -21,8 +21,7 @@
#include "caf/actor_proxy.hpp"
#include "caf/actor_proxy.hpp"
#include "caf/net/endpoint_manager.hpp"
#include "caf/net/endpoint_manager.hpp"
namespace
caf
{
namespace
caf
::
net
{
namespace
net
{
/// Implements a simple proxy forwarding all operations to a manager.
/// Implements a simple proxy forwarding all operations to a manager.
class
actor_proxy_impl
:
public
actor_proxy
{
class
actor_proxy_impl
:
public
actor_proxy
{
...
@@ -42,5 +41,4 @@ private:
...
@@ -42,5 +41,4 @@ private:
endpoint_manager_ptr
dst_
;
endpoint_manager_ptr
dst_
;
};
};
}
// namespace net
}
// namespace caf::net
}
// namespace caf
libcaf_net/caf/net/backend/test.hpp
View file @
ba13aad9
...
@@ -26,9 +26,7 @@
...
@@ -26,9 +26,7 @@
#include "caf/net/stream_socket.hpp"
#include "caf/net/stream_socket.hpp"
#include "caf/node_id.hpp"
#include "caf/node_id.hpp"
namespace
caf
{
namespace
caf
::
net
::
backend
{
namespace
net
{
namespace
backend
{
/// Minimal backend for unit testing.
/// Minimal backend for unit testing.
/// @warning this backend is *not* thread safe.
/// @warning this backend is *not* thread safe.
...
@@ -75,6 +73,4 @@ private:
...
@@ -75,6 +73,4 @@ private:
proxy_registry
proxies_
;
proxy_registry
proxies_
;
};
};
}
// namespace backend
}
// namespace caf::net::backend
}
// namespace net
}
// namespace caf
libcaf_net/caf/net/basp/application.hpp
View file @
ba13aad9
...
@@ -50,9 +50,7 @@
...
@@ -50,9 +50,7 @@
#include "caf/span.hpp"
#include "caf/span.hpp"
#include "caf/unit.hpp"
#include "caf/unit.hpp"
namespace
caf
{
namespace
caf
::
net
::
basp
{
namespace
net
{
namespace
basp
{
/// An implementation of BASP as an application layer protocol.
/// An implementation of BASP as an application layer protocol.
class
application
{
class
application
{
...
@@ -211,6 +209,4 @@ private:
...
@@ -211,6 +209,4 @@ private:
std
::
unique_ptr
<
hub_type
>
hub_
;
std
::
unique_ptr
<
hub_type
>
hub_
;
};
};
}
// namespace basp
}
// namespace caf::net::basp
}
// namespace net
}
// namespace caf
libcaf_net/caf/net/basp/connection_state.hpp
View file @
ba13aad9
...
@@ -20,9 +20,7 @@
...
@@ -20,9 +20,7 @@
#include <string>
#include <string>
namespace
caf
{
namespace
caf
::
net
::
basp
{
namespace
net
{
namespace
basp
{
/// @addtogroup BASP
/// @addtogroup BASP
...
@@ -48,6 +46,4 @@ std::string to_string(connection_state x);
...
@@ -48,6 +46,4 @@ std::string to_string(connection_state x);
/// @}
/// @}
}
// namespace basp
}
// namespace caf::net::basp
}
// namespace net
}
// namespace caf
libcaf_net/caf/net/basp/constants.hpp
View file @
ba13aad9
...
@@ -21,9 +21,7 @@
...
@@ -21,9 +21,7 @@
#include <cstddef>
#include <cstddef>
#include <cstdint>
#include <cstdint>
namespace
caf
{
namespace
caf
::
net
::
basp
{
namespace
net
{
namespace
basp
{
/// @addtogroup BASP
/// @addtogroup BASP
...
@@ -36,6 +34,4 @@ constexpr size_t header_size = 13;
...
@@ -36,6 +34,4 @@ constexpr size_t header_size = 13;
/// @}
/// @}
}
// namespace basp
}
// namespace caf::net::basp
}
// namespace net
}
// namespace caf
libcaf_net/caf/net/basp/ec.hpp
View file @
ba13aad9
...
@@ -23,9 +23,7 @@
...
@@ -23,9 +23,7 @@
#include "caf/fwd.hpp"
#include "caf/fwd.hpp"
namespace
caf
{
namespace
caf
::
net
::
basp
{
namespace
net
{
namespace
basp
{
/// BASP-specific error codes.
/// BASP-specific error codes.
enum
class
ec
:
uint8_t
{
enum
class
ec
:
uint8_t
{
...
@@ -51,6 +49,4 @@ std::string to_string(ec x);
...
@@ -51,6 +49,4 @@ std::string to_string(ec x);
/// @relates ec
/// @relates ec
error
make_error
(
ec
x
);
error
make_error
(
ec
x
);
}
// namespace basp
}
// namespace caf::net::basp
}
// namespace net
}
// namespace caf
libcaf_net/caf/net/basp/header.hpp
View file @
ba13aad9
...
@@ -28,9 +28,7 @@
...
@@ -28,9 +28,7 @@
#include "caf/net/basp/constants.hpp"
#include "caf/net/basp/constants.hpp"
#include "caf/net/basp/message_type.hpp"
#include "caf/net/basp/message_type.hpp"
namespace
caf
{
namespace
caf
::
net
::
basp
{
namespace
net
{
namespace
basp
{
/// @addtogroup BASP
/// @addtogroup BASP
...
@@ -91,6 +89,4 @@ typename Inspector::result_type inspect(Inspector& f, header& x) {
...
@@ -91,6 +89,4 @@ typename Inspector::result_type inspect(Inspector& f, header& x) {
/// @}
/// @}
}
// namespace basp
}
// namespace caf::net::basp
}
// namespace net
}
// namespace caf
libcaf_net/caf/net/basp/message_queue.hpp
View file @
ba13aad9
...
@@ -26,9 +26,7 @@
...
@@ -26,9 +26,7 @@
#include "caf/fwd.hpp"
#include "caf/fwd.hpp"
#include "caf/mailbox_element.hpp"
#include "caf/mailbox_element.hpp"
namespace
caf
{
namespace
caf
::
net
::
basp
{
namespace
net
{
namespace
basp
{
/// Enforces strict order of message delivery, i.e., deliver messages in the
/// Enforces strict order of message delivery, i.e., deliver messages in the
/// same order as if they were deserialized by a single thread.
/// same order as if they were deserialized by a single thread.
...
@@ -76,6 +74,4 @@ public:
...
@@ -76,6 +74,4 @@ public:
std
::
vector
<
actor_msg
>
pending
;
std
::
vector
<
actor_msg
>
pending
;
};
};
}
// namespace basp
}
// namespace caf::net::basp
}
// namespace net
}
// namespace caf
libcaf_net/caf/net/basp/message_type.hpp
View file @
ba13aad9
...
@@ -21,9 +21,7 @@
...
@@ -21,9 +21,7 @@
#include <cstdint>
#include <cstdint>
#include <string>
#include <string>
namespace
caf
{
namespace
caf
::
net
::
basp
{
namespace
net
{
namespace
basp
{
/// @addtogroup BASP
/// @addtogroup BASP
...
@@ -75,6 +73,4 @@ std::string to_string(message_type);
...
@@ -75,6 +73,4 @@ std::string to_string(message_type);
/// @}
/// @}
}
// namespace basp
}
// namespace caf::net::basp
}
// namespace net
}
// namespace caf
libcaf_net/caf/net/basp/remote_message_handler.hpp
View file @
ba13aad9
...
@@ -33,9 +33,7 @@
...
@@ -33,9 +33,7 @@
#include "caf/net/basp/header.hpp"
#include "caf/net/basp/header.hpp"
#include "caf/node_id.hpp"
#include "caf/node_id.hpp"
namespace
caf
{
namespace
caf
::
net
::
basp
{
namespace
net
{
namespace
basp
{
template
<
class
Subtype
>
template
<
class
Subtype
>
class
remote_message_handler
{
class
remote_message_handler
{
...
@@ -80,6 +78,4 @@ public:
...
@@ -80,6 +78,4 @@ public:
}
}
};
};
}
// namespace basp
}
// namespace caf::net::basp
}
// namespace net
}
// namespace caf
libcaf_net/caf/net/basp/worker.hpp
View file @
ba13aad9
...
@@ -32,9 +32,7 @@
...
@@ -32,9 +32,7 @@
#include "caf/node_id.hpp"
#include "caf/node_id.hpp"
#include "caf/resumable.hpp"
#include "caf/resumable.hpp"
namespace
caf
{
namespace
caf
::
net
::
basp
{
namespace
net
{
namespace
basp
{
/// Deserializes payloads for BASP messages asynchronously.
/// Deserializes payloads for BASP messages asynchronously.
class
worker
:
public
detail
::
abstract_worker
,
class
worker
:
public
detail
::
abstract_worker
,
...
@@ -113,6 +111,4 @@ private:
...
@@ -113,6 +111,4 @@ private:
buffer_type
payload_
;
buffer_type
payload_
;
};
};
}
// namespace basp
}
// namespace caf::net::basp
}
// namespace net
}
// namespace caf
libcaf_net/caf/net/datagram_socket.hpp
View file @
ba13aad9
...
@@ -21,8 +21,7 @@
...
@@ -21,8 +21,7 @@
#include "caf/net/network_socket.hpp"
#include "caf/net/network_socket.hpp"
#include "caf/variant.hpp"
#include "caf/variant.hpp"
namespace
caf
{
namespace
caf
::
net
{
namespace
net
{
/// A datagram-oriented network communication endpoint.
/// A datagram-oriented network communication endpoint.
struct
datagram_socket
:
network_socket
{
struct
datagram_socket
:
network_socket
{
...
@@ -41,5 +40,4 @@ error allow_connreset(datagram_socket x, bool new_value);
...
@@ -41,5 +40,4 @@ error allow_connreset(datagram_socket x, bool new_value);
variant
<
size_t
,
sec
>
variant
<
size_t
,
sec
>
check_datagram_socket_io_res
(
std
::
make_signed
<
size_t
>::
type
res
);
check_datagram_socket_io_res
(
std
::
make_signed
<
size_t
>::
type
res
);
}
// namespace net
}
// namespace caf::net
}
// namespace caf
libcaf_net/caf/net/defaults.hpp
View file @
ba13aad9
...
@@ -22,10 +22,7 @@
...
@@ -22,10 +22,7 @@
// -- hard-coded default values for various CAF options ------------------------
// -- hard-coded default values for various CAF options ------------------------
namespace
caf
{
namespace
caf
::
defaults
::
middleman
{
namespace
defaults
{
namespace
middleman
{
/// Maximum number of cached buffers for sending payloads.
/// Maximum number of cached buffers for sending payloads.
extern
const
size_t
max_payload_buffers
;
extern
const
size_t
max_payload_buffers
;
...
@@ -33,7 +30,4 @@ extern const size_t max_payload_buffers;
...
@@ -33,7 +30,4 @@ extern const size_t max_payload_buffers;
/// Maximum number of cached buffers for sending headers.
/// Maximum number of cached buffers for sending headers.
extern
const
size_t
max_header_buffers
;
extern
const
size_t
max_header_buffers
;
}
// namespace middleman
}
// namespace caf::defaults::middleman
}
// namespace defaults
}
// namespace caf
libcaf_net/caf/net/endpoint_manager.hpp
View file @
ba13aad9
...
@@ -34,8 +34,7 @@
...
@@ -34,8 +34,7 @@
#include "caf/net/socket_manager.hpp"
#include "caf/net/socket_manager.hpp"
#include "caf/variant.hpp"
#include "caf/variant.hpp"
namespace
caf
{
namespace
caf
::
net
{
namespace
net
{
/// Manages a communication endpoint.
/// Manages a communication endpoint.
class
endpoint_manager
:
public
socket_manager
{
class
endpoint_manager
:
public
socket_manager
{
...
@@ -104,5 +103,4 @@ protected:
...
@@ -104,5 +103,4 @@ protected:
using
endpoint_manager_ptr
=
intrusive_ptr
<
endpoint_manager
>
;
using
endpoint_manager_ptr
=
intrusive_ptr
<
endpoint_manager
>
;
}
// namespace net
}
// namespace caf::net
}
// namespace caf
libcaf_net/caf/net/endpoint_manager_impl.hpp
View file @
ba13aad9
...
@@ -25,8 +25,7 @@
...
@@ -25,8 +25,7 @@
#include "caf/detail/overload.hpp"
#include "caf/detail/overload.hpp"
#include "caf/net/endpoint_manager.hpp"
#include "caf/net/endpoint_manager.hpp"
namespace
caf
{
namespace
caf
::
net
{
namespace
net
{
template
<
class
Transport
>
template
<
class
Transport
>
class
endpoint_manager_impl
:
public
endpoint_manager
{
class
endpoint_manager_impl
:
public
endpoint_manager
{
...
@@ -132,5 +131,4 @@ private:
...
@@ -132,5 +131,4 @@ private:
uint64_t
next_timeout_id_
;
uint64_t
next_timeout_id_
;
};
};
}
// namespace net
}
// namespace caf::net
}
// namespace caf
libcaf_net/caf/net/endpoint_manager_queue.hpp
View file @
ba13aad9
...
@@ -28,8 +28,7 @@
...
@@ -28,8 +28,7 @@
#include "caf/unit.hpp"
#include "caf/unit.hpp"
#include "caf/variant.hpp"
#include "caf/variant.hpp"
namespace
caf
{
namespace
caf
::
net
{
namespace
net
{
class
endpoint_manager_queue
{
class
endpoint_manager_queue
{
public:
public:
...
@@ -201,5 +200,4 @@ public:
...
@@ -201,5 +200,4 @@ public:
using
type
=
intrusive
::
fifo_inbox
<
policy
>
;
using
type
=
intrusive
::
fifo_inbox
<
policy
>
;
};
};
}
// namespace net
}
// namespace caf::net
}
// namespace caf
libcaf_net/caf/net/host.hpp
View file @
ba13aad9
...
@@ -20,8 +20,7 @@
...
@@ -20,8 +20,7 @@
#include "caf/fwd.hpp"
#include "caf/fwd.hpp"
namespace
caf
{
namespace
caf
::
net
{
namespace
net
{
struct
this_host
{
struct
this_host
{
/// Initializes the network subsystem.
/// Initializes the network subsystem.
...
@@ -31,5 +30,4 @@ struct this_host {
...
@@ -31,5 +30,4 @@ struct this_host {
static
void
cleanup
();
static
void
cleanup
();
};
};
}
// namespace net
}
// namespace caf::net
}
// namespace caf
libcaf_net/caf/net/ip.hpp
View file @
ba13aad9
...
@@ -23,9 +23,7 @@
...
@@ -23,9 +23,7 @@
#include "caf/fwd.hpp"
#include "caf/fwd.hpp"
namespace
caf
{
namespace
caf
::
net
::
ip
{
namespace
net
{
namespace
ip
{
/// Returns all IP addresses of `host` (if any).
/// Returns all IP addresses of `host` (if any).
std
::
vector
<
ip_address
>
resolve
(
string_view
host
);
std
::
vector
<
ip_address
>
resolve
(
string_view
host
);
...
@@ -43,6 +41,4 @@ std::vector<ip_address> local_addresses(ip_address host);
...
@@ -43,6 +41,4 @@ std::vector<ip_address> local_addresses(ip_address host);
/// Returns the hostname of this device.
/// Returns the hostname of this device.
std
::
string
hostname
();
std
::
string
hostname
();
}
// namespace ip
}
// namespace caf::net::ip
}
// namespace net
}
// namespace caf
libcaf_net/caf/net/make_endpoint_manager.hpp
View file @
ba13aad9
...
@@ -22,8 +22,7 @@
...
@@ -22,8 +22,7 @@
#include "caf/net/endpoint_manager.hpp"
#include "caf/net/endpoint_manager.hpp"
#include "caf/net/endpoint_manager_impl.hpp"
#include "caf/net/endpoint_manager_impl.hpp"
namespace
caf
{
namespace
caf
::
net
{
namespace
net
{
template
<
class
Transport
>
template
<
class
Transport
>
endpoint_manager_ptr
make_endpoint_manager
(
const
multiplexer_ptr
&
mpx
,
endpoint_manager_ptr
make_endpoint_manager
(
const
multiplexer_ptr
&
mpx
,
...
@@ -32,5 +31,4 @@ endpoint_manager_ptr make_endpoint_manager(const multiplexer_ptr& mpx,
...
@@ -32,5 +31,4 @@ endpoint_manager_ptr make_endpoint_manager(const multiplexer_ptr& mpx,
return
make_counted
<
impl
>
(
mpx
,
sys
,
std
::
move
(
trans
));
return
make_counted
<
impl
>
(
mpx
,
sys
,
std
::
move
(
trans
));
}
}
}
// namespace net
}
// namespace caf::net
}
// namespace caf
libcaf_net/caf/net/middleman.hpp
View file @
ba13aad9
...
@@ -25,8 +25,7 @@
...
@@ -25,8 +25,7 @@
#include "caf/fwd.hpp"
#include "caf/fwd.hpp"
#include "caf/net/fwd.hpp"
#include "caf/net/fwd.hpp"
namespace
caf
{
namespace
caf
::
net
{
namespace
net
{
class
middleman
:
public
actor_system
::
module
{
class
middleman
:
public
actor_system
::
module
{
public:
public:
...
@@ -119,5 +118,4 @@ private:
...
@@ -119,5 +118,4 @@ private:
std
::
thread
mpx_thread_
;
std
::
thread
mpx_thread_
;
};
};
}
// namespace net
}
// namespace caf::net
}
// namespace caf
libcaf_net/caf/net/middleman_backend.hpp
View file @
ba13aad9
...
@@ -24,8 +24,7 @@
...
@@ -24,8 +24,7 @@
#include "caf/net/fwd.hpp"
#include "caf/net/fwd.hpp"
#include "caf/proxy_registry.hpp"
#include "caf/proxy_registry.hpp"
namespace
caf
{
namespace
caf
::
net
{
namespace
net
{
/// Technology-specific backend for connecting to and managing peer
/// Technology-specific backend for connecting to and managing peer
/// connections.
/// connections.
...
@@ -63,5 +62,4 @@ private:
...
@@ -63,5 +62,4 @@ private:
/// @relates middleman_backend
/// @relates middleman_backend
using
middleman_backend_ptr
=
std
::
unique_ptr
<
middleman_backend
>
;
using
middleman_backend_ptr
=
std
::
unique_ptr
<
middleman_backend
>
;
}
// namespace net
}
// namespace caf::net
}
// namespace caf
libcaf_net/caf/net/multiplexer.hpp
View file @
ba13aad9
...
@@ -34,8 +34,7 @@ struct pollfd;
...
@@ -34,8 +34,7 @@ struct pollfd;
}
// extern "C"
}
// extern "C"
namespace
caf
{
namespace
caf
::
net
{
namespace
net
{
/// Multiplexes any number of ::socket_manager objects with a ::socket.
/// Multiplexes any number of ::socket_manager objects with a ::socket.
class
multiplexer
:
public
std
::
enable_shared_from_this
<
multiplexer
>
{
class
multiplexer
:
public
std
::
enable_shared_from_this
<
multiplexer
>
{
...
@@ -128,5 +127,4 @@ using multiplexer_ptr = std::shared_ptr<multiplexer>;
...
@@ -128,5 +127,4 @@ using multiplexer_ptr = std::shared_ptr<multiplexer>;
/// @relates multiplexer
/// @relates multiplexer
using
weak_multiplexer_ptr
=
std
::
weak_ptr
<
multiplexer
>
;
using
weak_multiplexer_ptr
=
std
::
weak_ptr
<
multiplexer
>
;
}
// namespace net
}
// namespace caf::net
}
// namespace caf
libcaf_net/caf/net/network_socket.hpp
View file @
ba13aad9
...
@@ -28,8 +28,7 @@
...
@@ -28,8 +28,7 @@
#include "caf/net/socket.hpp"
#include "caf/net/socket.hpp"
#include "caf/net/socket_id.hpp"
#include "caf/net/socket_id.hpp"
namespace
caf
{
namespace
caf
::
net
{
namespace
net
{
/// A bidirectional network communication endpoint.
/// A bidirectional network communication endpoint.
struct
network_socket
:
socket
{
struct
network_socket
:
socket
{
...
@@ -83,5 +82,4 @@ void shutdown_write(network_socket x);
...
@@ -83,5 +82,4 @@ void shutdown_write(network_socket x);
/// @relates network_socket
/// @relates network_socket
void
shutdown
(
network_socket
x
);
void
shutdown
(
network_socket
x
);
}
// namespace net
}
// namespace caf::net
}
// namespace caf
libcaf_net/caf/net/operation.hpp
View file @
ba13aad9
...
@@ -20,8 +20,7 @@
...
@@ -20,8 +20,7 @@
#include <string>
#include <string>
namespace
caf
{
namespace
caf
::
net
{
namespace
net
{
/// Values for representing bitmask of I/O operations.
/// Values for representing bitmask of I/O operations.
enum
class
operation
{
enum
class
operation
{
...
@@ -49,5 +48,4 @@ constexpr operation operator~(operation x) {
...
@@ -49,5 +48,4 @@ constexpr operation operator~(operation x) {
std
::
string
to_string
(
operation
x
);
std
::
string
to_string
(
operation
x
);
}
// namespace net
}
// namespace caf::net
}
// namespace caf
libcaf_net/caf/net/packet_writer.hpp
View file @
ba13aad9
...
@@ -24,8 +24,7 @@
...
@@ -24,8 +24,7 @@
#include "caf/net/fwd.hpp"
#include "caf/net/fwd.hpp"
#include "caf/span.hpp"
#include "caf/span.hpp"
namespace
caf
{
namespace
caf
::
net
{
namespace
net
{
/// Implements an interface for packet writing in application-layers.
/// Implements an interface for packet writing in application-layers.
class
packet_writer
{
class
packet_writer
{
...
@@ -56,5 +55,4 @@ protected:
...
@@ -56,5 +55,4 @@ protected:
virtual
void
write_impl
(
span
<
buffer_type
*>
buffers
)
=
0
;
virtual
void
write_impl
(
span
<
buffer_type
*>
buffers
)
=
0
;
};
};
}
// namespace net
}
// namespace caf::net
}
// namespace caf
libcaf_net/caf/net/packet_writer_decorator.hpp
View file @
ba13aad9
...
@@ -23,8 +23,7 @@
...
@@ -23,8 +23,7 @@
#include "caf/byte.hpp"
#include "caf/byte.hpp"
#include "caf/span.hpp"
#include "caf/span.hpp"
namespace
caf
{
namespace
caf
::
net
{
namespace
net
{
/// Implements the interface for transport and application policies and
/// Implements the interface for transport and application policies and
/// dispatches member functions either to `object` or `parent`.
/// dispatches member functions either to `object` or `parent`.
...
@@ -93,5 +92,4 @@ make_packet_writer_decorator(Object& object, Parent& parent) {
...
@@ -93,5 +92,4 @@ make_packet_writer_decorator(Object& object, Parent& parent) {
return
{
object
,
parent
};
return
{
object
,
parent
};
}
}
}
// namespace net
}
// namespace caf::net
}
// namespace caf
libcaf_net/caf/net/pipe_socket.hpp
View file @
ba13aad9
...
@@ -26,8 +26,7 @@
...
@@ -26,8 +26,7 @@
#include "caf/net/socket.hpp"
#include "caf/net/socket.hpp"
#include "caf/net/socket_id.hpp"
#include "caf/net/socket_id.hpp"
namespace
caf
{
namespace
caf
::
net
{
namespace
net
{
/// A unidirectional communication endpoint for inter-process communication.
/// A unidirectional communication endpoint for inter-process communication.
struct
pipe_socket
:
socket
{
struct
pipe_socket
:
socket
{
...
@@ -63,5 +62,4 @@ variant<size_t, sec> read(pipe_socket x, span<byte>);
...
@@ -63,5 +62,4 @@ variant<size_t, sec> read(pipe_socket x, span<byte>);
variant
<
size_t
,
sec
>
variant
<
size_t
,
sec
>
check_pipe_socket_io_res
(
std
::
make_signed
<
size_t
>::
type
res
);
check_pipe_socket_io_res
(
std
::
make_signed
<
size_t
>::
type
res
);
}
// namespace net
}
// namespace caf::net
}
// namespace caf
libcaf_net/caf/net/pollset_updater.hpp
View file @
ba13aad9
...
@@ -26,8 +26,7 @@
...
@@ -26,8 +26,7 @@
#include "caf/net/pipe_socket.hpp"
#include "caf/net/pipe_socket.hpp"
#include "caf/net/socket_manager.hpp"
#include "caf/net/socket_manager.hpp"
namespace
caf
{
namespace
caf
::
net
{
namespace
net
{
class
pollset_updater
:
public
socket_manager
{
class
pollset_updater
:
public
socket_manager
{
public:
public:
...
@@ -63,5 +62,4 @@ private:
...
@@ -63,5 +62,4 @@ private:
size_t
buf_size_
;
size_t
buf_size_
;
};
};
}
// namespace net
}
// namespace caf::net
}
// namespace caf
libcaf_net/caf/net/receive_policy.hpp
View file @
ba13aad9
...
@@ -24,8 +24,7 @@
...
@@ -24,8 +24,7 @@
#include "caf/config.hpp"
#include "caf/config.hpp"
namespace
caf
{
namespace
caf
::
net
{
namespace
net
{
enum
class
receive_policy_flag
:
unsigned
{
at_least
,
at_most
,
exactly
};
enum
class
receive_policy_flag
:
unsigned
{
at_least
,
at_most
,
exactly
};
...
@@ -57,5 +56,4 @@ public:
...
@@ -57,5 +56,4 @@ public:
}
}
};
};
}
// namespace net
}
// namespace caf::net
}
// namespace caf
libcaf_net/caf/net/socket.hpp
View file @
ba13aad9
...
@@ -27,8 +27,7 @@
...
@@ -27,8 +27,7 @@
#include "caf/fwd.hpp"
#include "caf/fwd.hpp"
#include "caf/net/socket_id.hpp"
#include "caf/net/socket_id.hpp"
namespace
caf
{
namespace
caf
::
net
{
namespace
net
{
/// An internal endpoint for sending or receiving data. Can be either a
/// An internal endpoint for sending or receiving data. Can be either a
/// ::network_socket, ::pipe_socket, ::stream_socket, or ::datagram_socket.
/// ::network_socket, ::pipe_socket, ::stream_socket, or ::datagram_socket.
...
@@ -89,5 +88,4 @@ error child_process_inherit(socket x, bool new_value);
...
@@ -89,5 +88,4 @@ error child_process_inherit(socket x, bool new_value);
/// @relates socket
/// @relates socket
error
nonblocking
(
socket
x
,
bool
new_value
);
error
nonblocking
(
socket
x
,
bool
new_value
);
}
// namespace net
}
// namespace caf::net
}
// namespace caf
libcaf_net/caf/net/socket_guard.hpp
View file @
ba13aad9
...
@@ -20,8 +20,7 @@
...
@@ -20,8 +20,7 @@
#include "caf/net/socket_id.hpp"
#include "caf/net/socket_id.hpp"
namespace
caf
{
namespace
caf
::
net
{
namespace
net
{
/// Closes the guarded socket when destroyed.
/// Closes the guarded socket when destroyed.
template
<
class
Socket
>
template
<
class
Socket
>
...
@@ -78,5 +77,4 @@ socket_guard<Socket> make_socket_guard(Socket sock) {
...
@@ -78,5 +77,4 @@ socket_guard<Socket> make_socket_guard(Socket sock) {
return
socket_guard
<
Socket
>
{
sock
};
return
socket_guard
<
Socket
>
{
sock
};
}
}
}
// namespace net
}
// namespace caf::net
}
// namespace caf
libcaf_net/caf/net/socket_id.hpp
View file @
ba13aad9
...
@@ -24,8 +24,7 @@
...
@@ -24,8 +24,7 @@
#include "caf/config.hpp"
#include "caf/config.hpp"
namespace
caf
{
namespace
caf
::
net
{
namespace
net
{
#ifdef CAF_WINDOWS
#ifdef CAF_WINDOWS
...
@@ -51,5 +50,4 @@ constexpr socket_id invalid_socket_id = -1;
...
@@ -51,5 +50,4 @@ constexpr socket_id invalid_socket_id = -1;
/// @relates socket
/// @relates socket
using
signed_socket_id
=
std
::
make_signed
<
socket_id
>::
type
;
using
signed_socket_id
=
std
::
make_signed
<
socket_id
>::
type
;
}
// namespace net
}
// namespace caf::net
}
// namespace caf
libcaf_net/caf/net/socket_manager.hpp
View file @
ba13aad9
...
@@ -25,8 +25,7 @@
...
@@ -25,8 +25,7 @@
#include "caf/net/socket.hpp"
#include "caf/net/socket.hpp"
#include "caf/ref_counted.hpp"
#include "caf/ref_counted.hpp"
namespace
caf
{
namespace
caf
::
net
{
namespace
net
{
/// Manages the lifetime of a single socket and handles any I/O events on it.
/// Manages the lifetime of a single socket and handles any I/O events on it.
class
socket_manager
:
public
ref_counted
{
class
socket_manager
:
public
ref_counted
{
...
@@ -95,5 +94,4 @@ protected:
...
@@ -95,5 +94,4 @@ protected:
using
socket_manager_ptr
=
intrusive_ptr
<
socket_manager
>
;
using
socket_manager_ptr
=
intrusive_ptr
<
socket_manager
>
;
}
// namespace net
}
// namespace caf::net
}
// namespace caf
libcaf_net/caf/net/stream_socket.hpp
View file @
ba13aad9
...
@@ -21,8 +21,7 @@
...
@@ -21,8 +21,7 @@
#include "caf/fwd.hpp"
#include "caf/fwd.hpp"
#include "caf/net/network_socket.hpp"
#include "caf/net/network_socket.hpp"
namespace
caf
{
namespace
caf
::
net
{
namespace
net
{
/// A connection-oriented network communication endpoint for bidirectional byte
/// A connection-oriented network communication endpoint for bidirectional byte
/// streams.
/// streams.
...
@@ -78,5 +77,4 @@ variant<size_t, sec> write(stream_socket x,
...
@@ -78,5 +77,4 @@ variant<size_t, sec> write(stream_socket x,
variant
<
size_t
,
sec
>
variant
<
size_t
,
sec
>
check_stream_socket_io_res
(
std
::
make_signed
<
size_t
>::
type
res
);
check_stream_socket_io_res
(
std
::
make_signed
<
size_t
>::
type
res
);
}
// namespace net
}
// namespace caf::net
}
// namespace caf
libcaf_net/caf/net/tcp_accept_socket.hpp
View file @
ba13aad9
...
@@ -23,8 +23,7 @@
...
@@ -23,8 +23,7 @@
#include "caf/net/network_socket.hpp"
#include "caf/net/network_socket.hpp"
#include "caf/uri.hpp"
#include "caf/uri.hpp"
namespace
caf
{
namespace
caf
::
net
{
namespace
net
{
/// Represents a TCP acceptor in listening mode.
/// Represents a TCP acceptor in listening mode.
struct
tcp_accept_socket
:
network_socket
{
struct
tcp_accept_socket
:
network_socket
{
...
@@ -58,5 +57,4 @@ make_tcp_accept_socket(const uri::authority_type& node,
...
@@ -58,5 +57,4 @@ make_tcp_accept_socket(const uri::authority_type& node,
/// @relates tcp_accept_socket
/// @relates tcp_accept_socket
expected
<
tcp_stream_socket
>
accept
(
tcp_accept_socket
x
);
expected
<
tcp_stream_socket
>
accept
(
tcp_accept_socket
x
);
}
// namespace net
}
// namespace caf::net
}
// namespace caf
libcaf_net/caf/net/tcp_stream_socket.hpp
View file @
ba13aad9
...
@@ -23,8 +23,7 @@
...
@@ -23,8 +23,7 @@
#include "caf/net/stream_socket.hpp"
#include "caf/net/stream_socket.hpp"
#include "caf/uri.hpp"
#include "caf/uri.hpp"
namespace
caf
{
namespace
caf
::
net
{
namespace
net
{
/// Represents a TCP connection.
/// Represents a TCP connection.
struct
tcp_stream_socket
:
stream_socket
{
struct
tcp_stream_socket
:
stream_socket
{
...
@@ -46,5 +45,4 @@ expected<tcp_stream_socket> make_connected_tcp_stream_socket(ip_endpoint node);
...
@@ -46,5 +45,4 @@ expected<tcp_stream_socket> make_connected_tcp_stream_socket(ip_endpoint node);
expected
<
tcp_stream_socket
>
expected
<
tcp_stream_socket
>
make_connected_tcp_stream_socket
(
const
uri
::
authority_type
&
node
);
make_connected_tcp_stream_socket
(
const
uri
::
authority_type
&
node
);
}
// namespace net
}
// namespace caf::net
}
// namespace caf
libcaf_net/caf/net/udp_datagram_socket.hpp
View file @
ba13aad9
...
@@ -21,8 +21,7 @@
...
@@ -21,8 +21,7 @@
#include "caf/fwd.hpp"
#include "caf/fwd.hpp"
#include "caf/net/network_socket.hpp"
#include "caf/net/network_socket.hpp"
namespace
caf
{
namespace
caf
::
net
{
namespace
net
{
/// A datagram-oriented network communication endpoint for bidirectional
/// A datagram-oriented network communication endpoint for bidirectional
/// byte transmission.
/// byte transmission.
...
@@ -83,5 +82,4 @@ variant<size_t, sec> write(udp_datagram_socket x, span<const byte> buf,
...
@@ -83,5 +82,4 @@ variant<size_t, sec> write(udp_datagram_socket x, span<const byte> buf,
variant
<
size_t
,
sec
>
variant
<
size_t
,
sec
>
check_udp_datagram_socket_io_res
(
std
::
make_signed
<
size_t
>::
type
res
);
check_udp_datagram_socket_io_res
(
std
::
make_signed
<
size_t
>::
type
res
);
}
// namespace net
}
// namespace caf::net
}
// namespace caf
libcaf_net/src/actor_proxy_impl.cpp
View file @
ba13aad9
...
@@ -22,8 +22,7 @@
...
@@ -22,8 +22,7 @@
#include "caf/expected.hpp"
#include "caf/expected.hpp"
#include "caf/logger.hpp"
#include "caf/logger.hpp"
namespace
caf
{
namespace
caf
::
net
{
namespace
net
{
actor_proxy_impl
::
actor_proxy_impl
(
actor_config
&
cfg
,
endpoint_manager_ptr
dst
)
actor_proxy_impl
::
actor_proxy_impl
(
actor_config
&
cfg
,
endpoint_manager_ptr
dst
)
:
super
(
cfg
),
sf_
(
dst
->
serialize_fun
()),
dst_
(
std
::
move
(
dst
))
{
:
super
(
cfg
),
sf_
(
dst
->
serialize_fun
()),
dst_
(
std
::
move
(
dst
))
{
...
@@ -50,5 +49,4 @@ void actor_proxy_impl::kill_proxy(execution_unit* ctx, error rsn) {
...
@@ -50,5 +49,4 @@ void actor_proxy_impl::kill_proxy(execution_unit* ctx, error rsn) {
cleanup
(
std
::
move
(
rsn
),
ctx
);
cleanup
(
std
::
move
(
rsn
),
ctx
);
}
}
}
// namespace net
}
// namespace caf::net
}
// namespace caf
libcaf_net/src/application.cpp
View file @
ba13aad9
...
@@ -41,9 +41,7 @@
...
@@ -41,9 +41,7 @@
#include "caf/string_algorithms.hpp"
#include "caf/string_algorithms.hpp"
#include "caf/type_erased_tuple.hpp"
#include "caf/type_erased_tuple.hpp"
namespace
caf
{
namespace
caf
::
net
::
basp
{
namespace
net
{
namespace
basp
{
application
::
application
(
proxy_registry
&
proxies
)
application
::
application
(
proxy_registry
&
proxies
)
:
proxies_
(
proxies
),
queue_
{
new
message_queue
},
hub_
{
new
hub_type
}
{
:
proxies_
(
proxies
),
queue_
{
new
message_queue
},
hub_
{
new
hub_type
}
{
...
@@ -397,6 +395,4 @@ error application::generate_handshake(std::vector<byte>& buf) {
...
@@ -397,6 +395,4 @@ error application::generate_handshake(std::vector<byte>& buf) {
defaults
::
middleman
::
app_identifiers
));
defaults
::
middleman
::
app_identifiers
));
}
}
}
// namespace basp
}
// namespace caf::net::basp
}
// namespace net
}
// namespace caf
libcaf_net/src/convert_ip_endpoint.cpp
View file @
ba13aad9
...
@@ -23,8 +23,7 @@
...
@@ -23,8 +23,7 @@
#include "caf/ipv6_endpoint.hpp"
#include "caf/ipv6_endpoint.hpp"
#include "caf/sec.hpp"
#include "caf/sec.hpp"
namespace
caf
{
namespace
caf
::
detail
{
namespace
detail
{
void
convert
(
const
ip_endpoint
&
src
,
sockaddr_storage
&
dst
)
{
void
convert
(
const
ip_endpoint
&
src
,
sockaddr_storage
&
dst
)
{
memset
(
&
dst
,
0
,
sizeof
(
sockaddr_storage
));
memset
(
&
dst
,
0
,
sizeof
(
sockaddr_storage
));
...
@@ -60,5 +59,4 @@ error convert(const sockaddr_storage& src, ip_endpoint& dst) {
...
@@ -60,5 +59,4 @@ error convert(const sockaddr_storage& src, ip_endpoint& dst) {
return
none
;
return
none
;
}
}
}
// namespace detail
}
// namespace caf::detail
}
// namespace caf
libcaf_net/src/datagram_socket.cpp
View file @
ba13aad9
...
@@ -22,8 +22,7 @@
...
@@ -22,8 +22,7 @@
#include "caf/detail/socket_sys_includes.hpp"
#include "caf/detail/socket_sys_includes.hpp"
#include "caf/logger.hpp"
#include "caf/logger.hpp"
namespace
caf
{
namespace
caf
::
net
{
namespace
net
{
#ifdef CAF_WINDOWS
#ifdef CAF_WINDOWS
...
@@ -60,5 +59,4 @@ check_datagram_socket_io_res(std::make_signed<size_t>::type res) {
...
@@ -60,5 +59,4 @@ check_datagram_socket_io_res(std::make_signed<size_t>::type res) {
return
static_cast
<
size_t
>
(
res
);
return
static_cast
<
size_t
>
(
res
);
}
}
}
// namespace net
}
// namespace caf::net
}
// namespace caf
libcaf_net/src/defaults.cpp
View file @
ba13aad9
...
@@ -18,16 +18,10 @@
...
@@ -18,16 +18,10 @@
#include "caf/net/defaults.hpp"
#include "caf/net/defaults.hpp"
namespace
caf
{
namespace
caf
::
defaults
::
middleman
{
namespace
defaults
{
namespace
middleman
{
const
size_t
max_payload_buffers
=
100
;
const
size_t
max_payload_buffers
=
100
;
const
size_t
max_header_buffers
=
10
;
const
size_t
max_header_buffers
=
10
;
}
// namespace middleman
}
// namespace caf::defaults::middleman
}
// namespace defaults
}
// namespace caf
libcaf_net/src/ec.cpp
View file @
ba13aad9
...
@@ -22,14 +22,10 @@
...
@@ -22,14 +22,10 @@
#include "caf/error.hpp"
#include "caf/error.hpp"
#include "caf/string_view.hpp"
#include "caf/string_view.hpp"
namespace
caf
{
namespace
caf
::
net
::
basp
{
namespace
net
{
namespace
basp
{
error
make_error
(
ec
x
)
{
error
make_error
(
ec
x
)
{
return
{
static_cast
<
uint8_t
>
(
x
),
atom
(
"basp"
)};
return
{
static_cast
<
uint8_t
>
(
x
),
atom
(
"basp"
)};
}
}
}
// namespace basp
}
// namespace caf::net::basp
}
// namespace net
}
// namespace caf
libcaf_net/src/endpoint_manager.cpp
View file @
ba13aad9
...
@@ -24,8 +24,7 @@
...
@@ -24,8 +24,7 @@
#include "caf/sec.hpp"
#include "caf/sec.hpp"
#include "caf/send.hpp"
#include "caf/send.hpp"
namespace
caf
{
namespace
caf
::
net
{
namespace
net
{
endpoint_manager
::
endpoint_manager
(
socket
handle
,
const
multiplexer_ptr
&
parent
,
endpoint_manager
::
endpoint_manager
(
socket
handle
,
const
multiplexer_ptr
&
parent
,
actor_system
&
sys
)
actor_system
&
sys
)
...
@@ -87,5 +86,4 @@ bool endpoint_manager::enqueue(endpoint_manager_queue::element* ptr) {
...
@@ -87,5 +86,4 @@ bool endpoint_manager::enqueue(endpoint_manager_queue::element* ptr) {
}
}
}
}
}
// namespace net
}
// namespace caf::net
}
// namespace caf
libcaf_net/src/header.cpp
View file @
ba13aad9
...
@@ -24,9 +24,7 @@
...
@@ -24,9 +24,7 @@
#include "caf/detail/network_order.hpp"
#include "caf/detail/network_order.hpp"
#include "caf/span.hpp"
#include "caf/span.hpp"
namespace
caf
{
namespace
caf
::
net
::
basp
{
namespace
net
{
namespace
basp
{
namespace
{
namespace
{
...
@@ -69,6 +67,4 @@ void to_bytes(header x, std::vector<byte>& buf) {
...
@@ -69,6 +67,4 @@ void to_bytes(header x, std::vector<byte>& buf) {
to_bytes_impl
(
x
,
buf
.
data
());
to_bytes_impl
(
x
,
buf
.
data
());
}
}
}
// namespace basp
}
// namespace caf::net::basp
}
// namespace net
}
// namespace caf
libcaf_net/src/host.cpp
View file @
ba13aad9
...
@@ -25,8 +25,7 @@
...
@@ -25,8 +25,7 @@
#include "caf/net/socket.hpp"
#include "caf/net/socket.hpp"
#include "caf/none.hpp"
#include "caf/none.hpp"
namespace
caf
{
namespace
caf
::
net
{
namespace
net
{
#ifdef CAF_WINDOWS
#ifdef CAF_WINDOWS
...
@@ -53,5 +52,4 @@ void this_host::cleanup() {
...
@@ -53,5 +52,4 @@ void this_host::cleanup() {
#endif // CAF_WINDOWS
#endif // CAF_WINDOWS
}
// namespace net
}
// namespace caf::net
}
// namespace caf
libcaf_net/src/ip.cpp
View file @
ba13aad9
...
@@ -54,9 +54,7 @@ using std::pair;
...
@@ -54,9 +54,7 @@ using std::pair;
using
std
::
string
;
using
std
::
string
;
using
std
::
vector
;
using
std
::
vector
;
namespace
caf
{
namespace
caf
::
net
::
ip
{
namespace
net
{
namespace
ip
{
namespace
{
namespace
{
...
@@ -251,6 +249,4 @@ std::string hostname() {
...
@@ -251,6 +249,4 @@ std::string hostname() {
return
buf
;
return
buf
;
}
}
}
// namespace ip
}
// namespace caf::net::ip
}
// namespace net
}
// namespace caf
libcaf_net/src/message_queue.cpp
View file @
ba13aad9
...
@@ -20,9 +20,7 @@
...
@@ -20,9 +20,7 @@
#include <iterator>
#include <iterator>
namespace
caf
{
namespace
caf
::
net
::
basp
{
namespace
net
{
namespace
basp
{
message_queue
::
message_queue
()
:
next_id
(
0
),
next_undelivered
(
0
)
{
message_queue
::
message_queue
()
:
next_id
(
0
),
next_undelivered
(
0
)
{
// nop
// nop
...
@@ -72,6 +70,4 @@ uint64_t message_queue::new_id() {
...
@@ -72,6 +70,4 @@ uint64_t message_queue::new_id() {
return
next_id
++
;
return
next_id
++
;
}
}
}
// namespace basp
}
// namespace caf::net::basp
}
// namespace net
}
// namespace caf
libcaf_net/src/multiplexer.cpp
View file @
ba13aad9
...
@@ -38,8 +38,7 @@
...
@@ -38,8 +38,7 @@
# include "caf/detail/socket_sys_includes.hpp"
# include "caf/detail/socket_sys_includes.hpp"
#endif // CAF_WINDOWS
#endif // CAF_WINDOWS
namespace
caf
{
namespace
caf
::
net
{
namespace
net
{
#ifndef POLLRDHUP
#ifndef POLLRDHUP
# define POLLRDHUP POLLHUP
# define POLLRDHUP POLLHUP
...
@@ -283,5 +282,4 @@ void multiplexer::write_to_pipe(uint8_t opcode, const socket_manager_ptr& mgr) {
...
@@ -283,5 +282,4 @@ void multiplexer::write_to_pipe(uint8_t opcode, const socket_manager_ptr& mgr) {
mgr
->
deref
();
mgr
->
deref
();
}
}
}
// namespace net
}
// namespace caf::net
}
// namespace caf
libcaf_net/src/net/backend/test.cpp
View file @
ba13aad9
...
@@ -29,9 +29,7 @@
...
@@ -29,9 +29,7 @@
#include "caf/raise_error.hpp"
#include "caf/raise_error.hpp"
#include "caf/send.hpp"
#include "caf/send.hpp"
namespace
caf
{
namespace
caf
::
net
::
backend
{
namespace
net
{
namespace
backend
{
test
::
test
(
middleman
&
mm
)
test
::
test
(
middleman
&
mm
)
:
middleman_backend
(
"test"
),
mm_
(
mm
),
proxies_
(
mm
.
system
(),
*
this
)
{
:
middleman_backend
(
"test"
),
mm_
(
mm
),
proxies_
(
mm
.
system
(),
*
this
)
{
...
@@ -101,6 +99,4 @@ test::peer_entry& test::get_peer(const node_id& id) {
...
@@ -101,6 +99,4 @@ test::peer_entry& test::get_peer(const node_id& id) {
return
emplace
(
id
,
sockets
->
first
,
sockets
->
second
);
return
emplace
(
id
,
sockets
->
first
,
sockets
->
second
);
}
}
}
// namespace backend
}
// namespace caf::net::backend
}
// namespace net
}
// namespace caf
libcaf_net/src/net/endpoint_manager_queue.cpp
View file @
ba13aad9
...
@@ -18,8 +18,7 @@
...
@@ -18,8 +18,7 @@
#include "caf/net/endpoint_manager_queue.hpp"
#include "caf/net/endpoint_manager_queue.hpp"
namespace
caf
{
namespace
caf
::
net
{
namespace
net
{
endpoint_manager_queue
::
element
::~
element
()
{
endpoint_manager_queue
::
element
::~
element
()
{
// nop
// nop
...
@@ -74,5 +73,4 @@ endpoint_manager_queue::message::~message() {
...
@@ -74,5 +73,4 @@ endpoint_manager_queue::message::~message() {
// nop
// nop
}
}
}
// namespace net
}
// namespace caf::net
}
// namespace caf
libcaf_net/src/net/middleman.cpp
View file @
ba13aad9
...
@@ -27,8 +27,7 @@
...
@@ -27,8 +27,7 @@
#include "caf/send.hpp"
#include "caf/send.hpp"
#include "caf/uri.hpp"
#include "caf/uri.hpp"
namespace
caf
{
namespace
caf
::
net
{
namespace
net
{
middleman
::
middleman
(
actor_system
&
sys
)
:
sys_
(
sys
)
{
middleman
::
middleman
(
actor_system
&
sys
)
:
sys_
(
sys
)
{
mpx_
=
std
::
make_shared
<
multiplexer
>
();
mpx_
=
std
::
make_shared
<
multiplexer
>
();
...
@@ -103,5 +102,4 @@ middleman_backend* middleman::backend(string_view scheme) const noexcept {
...
@@ -103,5 +102,4 @@ middleman_backend* middleman::backend(string_view scheme) const noexcept {
return
nullptr
;
return
nullptr
;
}
}
}
// namespace net
}
// namespace caf::net
}
// namespace caf
libcaf_net/src/net/middleman_backend.cpp
View file @
ba13aad9
...
@@ -18,8 +18,7 @@
...
@@ -18,8 +18,7 @@
#include "caf/net/middleman_backend.hpp"
#include "caf/net/middleman_backend.hpp"
namespace
caf
{
namespace
caf
::
net
{
namespace
net
{
middleman_backend
::
middleman_backend
(
std
::
string
id
)
:
id_
(
std
::
move
(
id
))
{
middleman_backend
::
middleman_backend
(
std
::
string
id
)
:
id_
(
std
::
move
(
id
))
{
// nop
// nop
...
@@ -29,5 +28,4 @@ middleman_backend::~middleman_backend() {
...
@@ -29,5 +28,4 @@ middleman_backend::~middleman_backend() {
// nop
// nop
}
}
}
// namespace net
}
// namespace caf::net
}
// namespace caf
libcaf_net/src/net/packet_writer.cpp
View file @
ba13aad9
...
@@ -18,12 +18,10 @@
...
@@ -18,12 +18,10 @@
#include "caf/net/packet_writer.hpp"
#include "caf/net/packet_writer.hpp"
namespace
caf
{
namespace
caf
::
net
{
namespace
net
{
packet_writer
::~
packet_writer
()
{
packet_writer
::~
packet_writer
()
{
// nop
// nop
}
}
}
// namespace net
}
// namespace caf::net
}
// namespace caf
libcaf_net/src/network_socket.cpp
View file @
ba13aad9
...
@@ -55,8 +55,7 @@ uint16_t port_of(sockaddr& what) {
...
@@ -55,8 +55,7 @@ uint16_t port_of(sockaddr& what) {
}
// namespace
}
// namespace
namespace
caf
{
namespace
caf
::
net
{
namespace
net
{
#if defined(CAF_MACOS) || defined(CAF_IOS) || defined(CAF_BSD)
#if defined(CAF_MACOS) || defined(CAF_IOS) || defined(CAF_BSD)
# define CAF_HAS_NOSIGPIPE_SOCKET_FLAG
# define CAF_HAS_NOSIGPIPE_SOCKET_FLAG
...
@@ -81,7 +80,6 @@ error allow_udp_connreset(network_socket x, bool new_value) {
...
@@ -81,7 +80,6 @@ error allow_udp_connreset(network_socket x, bool new_value) {
}
}
#else // CAF_WINDOWS
#else // CAF_WINDOWS
error
allow_sigpipe
(
network_socket
x
,
bool
new_value
)
{
error
allow_sigpipe
(
network_socket
x
,
bool
new_value
)
{
# ifdef CAF_HAS_NOSIGPIPE_SOCKET_FLAG
# ifdef CAF_HAS_NOSIGPIPE_SOCKET_FLAG
int
value
=
new_value
?
0
:
1
;
int
value
=
new_value
?
0
:
1
;
...
@@ -193,5 +191,4 @@ void shutdown(network_socket x) {
...
@@ -193,5 +191,4 @@ void shutdown(network_socket x) {
::
shutdown
(
x
.
id
,
2
);
::
shutdown
(
x
.
id
,
2
);
}
}
}
// namespace net
}
// namespace caf::net
}
// namespace caf
libcaf_net/src/pipe_socket.cpp
View file @
ba13aad9
...
@@ -34,8 +34,7 @@
...
@@ -34,8 +34,7 @@
#include "caf/span.hpp"
#include "caf/span.hpp"
#include "caf/variant.hpp"
#include "caf/variant.hpp"
namespace
caf
{
namespace
caf
::
net
{
namespace
net
{
#ifdef CAF_WINDOWS
#ifdef CAF_WINDOWS
...
@@ -102,5 +101,4 @@ check_pipe_socket_io_res(std::make_signed<size_t>::type res) {
...
@@ -102,5 +101,4 @@ check_pipe_socket_io_res(std::make_signed<size_t>::type res) {
return
check_stream_socket_io_res
(
res
);
return
check_stream_socket_io_res
(
res
);
}
}
}
// namespace net
}
// namespace caf::net
}
// namespace caf
libcaf_net/src/pollset_updater.cpp
View file @
ba13aad9
...
@@ -23,8 +23,7 @@
...
@@ -23,8 +23,7 @@
#include "caf/span.hpp"
#include "caf/span.hpp"
#include "caf/variant.hpp"
#include "caf/variant.hpp"
namespace
caf
{
namespace
caf
::
net
{
namespace
net
{
pollset_updater
::
pollset_updater
(
pipe_socket
read_handle
,
pollset_updater
::
pollset_updater
(
pipe_socket
read_handle
,
const
multiplexer_ptr
&
parent
)
const
multiplexer_ptr
&
parent
)
...
@@ -72,5 +71,4 @@ void pollset_updater::handle_error(sec) {
...
@@ -72,5 +71,4 @@ void pollset_updater::handle_error(sec) {
// nop
// nop
}
}
}
// namespace net
}
// namespace caf::net
}
// namespace caf
libcaf_net/src/socket.cpp
View file @
ba13aad9
...
@@ -27,8 +27,7 @@
...
@@ -27,8 +27,7 @@
#include "caf/sec.hpp"
#include "caf/sec.hpp"
#include "caf/variant.hpp"
#include "caf/variant.hpp"
namespace
caf
{
namespace
caf
::
net
{
namespace
net
{
#ifdef CAF_WINDOWS
#ifdef CAF_WINDOWS
...
@@ -180,5 +179,4 @@ error nonblocking(socket x, bool new_value) {
...
@@ -180,5 +179,4 @@ error nonblocking(socket x, bool new_value) {
#endif // CAF_WINDOWS
#endif // CAF_WINDOWS
}
// namespace net
}
// namespace caf::net
}
// namespace caf
libcaf_net/src/socket_manager.cpp
View file @
ba13aad9
...
@@ -21,8 +21,7 @@
...
@@ -21,8 +21,7 @@
#include "caf/config.hpp"
#include "caf/config.hpp"
#include "caf/net/multiplexer.hpp"
#include "caf/net/multiplexer.hpp"
namespace
caf
{
namespace
caf
::
net
{
namespace
net
{
socket_manager
::
socket_manager
(
socket
handle
,
const
multiplexer_ptr
&
parent
)
socket_manager
::
socket_manager
(
socket
handle
,
const
multiplexer_ptr
&
parent
)
:
handle_
(
handle
),
mask_
(
operation
::
none
),
parent_
(
parent
)
{
:
handle_
(
handle
),
mask_
(
operation
::
none
),
parent_
(
parent
)
{
...
@@ -68,5 +67,4 @@ void socket_manager::register_writing() {
...
@@ -68,5 +67,4 @@ void socket_manager::register_writing() {
ptr
->
register_writing
(
this
);
ptr
->
register_writing
(
this
);
}
}
}
// namespace net
}
// namespace caf::net
}
// namespace caf
libcaf_net/src/stream_socket.cpp
View file @
ba13aad9
...
@@ -31,8 +31,7 @@
...
@@ -31,8 +31,7 @@
# include <sys/uio.h>
# include <sys/uio.h>
#endif
#endif
namespace
caf
{
namespace
caf
::
net
{
namespace
net
{
#ifdef CAF_WINDOWS
#ifdef CAF_WINDOWS
...
@@ -234,5 +233,4 @@ check_stream_socket_io_res(std::make_signed<size_t>::type res) {
...
@@ -234,5 +233,4 @@ check_stream_socket_io_res(std::make_signed<size_t>::type res) {
return
static_cast
<
size_t
>
(
res
);
return
static_cast
<
size_t
>
(
res
);
}
}
}
// namespace net
}
// namespace caf::net
}
// namespace caf
libcaf_net/src/tcp_accept_socket.cpp
View file @
ba13aad9
...
@@ -31,8 +31,7 @@
...
@@ -31,8 +31,7 @@
#include "caf/net/tcp_stream_socket.hpp"
#include "caf/net/tcp_stream_socket.hpp"
#include "caf/sec.hpp"
#include "caf/sec.hpp"
namespace
caf
{
namespace
caf
::
net
{
namespace
net
{
namespace
{
namespace
{
...
@@ -145,5 +144,4 @@ expected<tcp_stream_socket> accept(tcp_accept_socket x) {
...
@@ -145,5 +144,4 @@ expected<tcp_stream_socket> accept(tcp_accept_socket x) {
return
tcp_stream_socket
{
sock
};
return
tcp_stream_socket
{
sock
};
}
}
}
// namespace net
}
// namespace caf::net
}
// namespace caf
libcaf_net/src/tcp_stream_socket.cpp
View file @
ba13aad9
...
@@ -29,8 +29,7 @@
...
@@ -29,8 +29,7 @@
#include "caf/sec.hpp"
#include "caf/sec.hpp"
#include "caf/variant.hpp"
#include "caf/variant.hpp"
namespace
caf
{
namespace
caf
::
net
{
namespace
net
{
namespace
{
namespace
{
...
@@ -96,5 +95,4 @@ make_connected_tcp_stream_socket(const uri::authority_type& node) {
...
@@ -96,5 +95,4 @@ make_connected_tcp_stream_socket(const uri::authority_type& node) {
return
make_error
(
sec
::
cannot_connect_to_node
,
to_string
(
node
));
return
make_error
(
sec
::
cannot_connect_to_node
,
to_string
(
node
));
}
}
}
// namespace net
}
// namespace caf::net
}
// namespace caf
libcaf_net/src/udp_datagram_socket.cpp
View file @
ba13aad9
...
@@ -29,8 +29,7 @@
...
@@ -29,8 +29,7 @@
#include "caf/net/socket_guard.hpp"
#include "caf/net/socket_guard.hpp"
#include "caf/span.hpp"
#include "caf/span.hpp"
namespace
caf
{
namespace
caf
::
net
{
namespace
net
{
#ifdef CAF_WINDOWS
#ifdef CAF_WINDOWS
...
@@ -191,5 +190,4 @@ check_udp_datagram_socket_io_res(std::make_signed<size_t>::type res) {
...
@@ -191,5 +190,4 @@ check_udp_datagram_socket_io_res(std::make_signed<size_t>::type res) {
return
static_cast
<
size_t
>
(
res
);
return
static_cast
<
size_t
>
(
res
);
}
}
}
// namespace net
}
// namespace caf::net
}
// namespace caf
libcaf_net/src/worker.cpp
View file @
ba13aad9
...
@@ -24,9 +24,7 @@
...
@@ -24,9 +24,7 @@
#include "caf/proxy_registry.hpp"
#include "caf/proxy_registry.hpp"
#include "caf/scheduler/abstract_coordinator.hpp"
#include "caf/scheduler/abstract_coordinator.hpp"
namespace
caf
{
namespace
caf
::
net
::
basp
{
namespace
net
{
namespace
basp
{
// -- constructors, destructors, and assignment operators ----------------------
// -- constructors, destructors, and assignment operators ----------------------
...
@@ -60,6 +58,4 @@ resumable::resume_result worker::resume(execution_unit* ctx, size_t) {
...
@@ -60,6 +58,4 @@ resumable::resume_result worker::resume(execution_unit* ctx, size_t) {
return
resumable
::
awaiting_message
;
return
resumable
::
awaiting_message
;
}
}
}
// namespace basp
}
// namespace caf::net::basp
}
// namespace net
}
// namespace caf
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