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
63352cf9
Commit
63352cf9
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
cd952825
cccaaa9d
Changes
67
Hide whitespace changes
Inline
Side-by-side
Showing
67 changed files
with
134 additions
and
313 deletions
+134
-313
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.
libcaf_net/caf/detail/convert_ip_endpoint.hpp
View file @
63352cf9
...
@@ -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 @
63352cf9
...
@@ -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 @
63352cf9
...
@@ -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 @
63352cf9
...
@@ -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 @
63352cf9
...
@@ -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 @
63352cf9
...
@@ -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 @
63352cf9
...
@@ -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 @
63352cf9
...
@@ -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 @
63352cf9
...
@@ -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 @
63352cf9
...
@@ -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 @
63352cf9
...
@@ -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 @
63352cf9
...
@@ -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 @
63352cf9
...
@@ -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 @
63352cf9
...
@@ -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 @
63352cf9
...
@@ -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 @
63352cf9
...
@@ -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 @
63352cf9
...
@@ -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 @
63352cf9
...
@@ -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 @
63352cf9
...
@@ -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 @
63352cf9
...
@@ -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 @
63352cf9
...
@@ -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 @
63352cf9
...
@@ -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 @
63352cf9
...
@@ -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 @
63352cf9
...
@@ -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 @
63352cf9
...
@@ -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 @
63352cf9
...
@@ -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 @
63352cf9
...
@@ -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 @
63352cf9
...
@@ -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 @
63352cf9
...
@@ -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 @
63352cf9
...
@@ -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 @
63352cf9
...
@@ -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 @
63352cf9
...
@@ -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 @
63352cf9
...
@@ -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 @
63352cf9
...
@@ -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 @
63352cf9
...
@@ -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 @
63352cf9
...
@@ -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 @
63352cf9
...
@@ -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 @
63352cf9
...
@@ -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 @
63352cf9
...
@@ -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 @
63352cf9
...
@@ -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 @
63352cf9
...
@@ -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 @
63352cf9
...
@@ -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 @
63352cf9
...
@@ -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 @
63352cf9
...
@@ -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 @
63352cf9
...
@@ -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 @
63352cf9
...
@@ -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 @
63352cf9
...
@@ -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 @
63352cf9
...
@@ -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 @
63352cf9
...
@@ -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 @
63352cf9
...
@@ -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 @
63352cf9
...
@@ -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 @
63352cf9
...
@@ -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 @
63352cf9
...
@@ -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 @
63352cf9
...
@@ -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 @
63352cf9
...
@@ -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 @
63352cf9
...
@@ -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 @
63352cf9
...
@@ -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 @
63352cf9
...
@@ -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 @
63352cf9
...
@@ -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 @
63352cf9
...
@@ -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 @
63352cf9
...
@@ -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 @
63352cf9
...
@@ -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 @
63352cf9
...
@@ -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 @
63352cf9
...
@@ -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 @
63352cf9
...
@@ -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 @
63352cf9
...
@@ -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 @
63352cf9
...
@@ -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