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
0d121f35
Commit
0d121f35
authored
Jul 10, 2019
by
Dominik Charousset
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add comments and remove invalid_network_socket
parent
2e367398
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
4 additions
and
6 deletions
+4
-6
libcaf_net/caf/net/network_socket.hpp
libcaf_net/caf/net/network_socket.hpp
+1
-4
libcaf_net/caf/net/pipe_socket.hpp
libcaf_net/caf/net/pipe_socket.hpp
+1
-0
libcaf_net/src/network_socket.cpp
libcaf_net/src/network_socket.cpp
+1
-1
libcaf_net/test/network_socket.cpp
libcaf_net/test/network_socket.cpp
+1
-1
No files found.
libcaf_net/caf/net/network_socket.hpp
View file @
0d121f35
...
...
@@ -32,6 +32,7 @@
namespace
caf
{
namespace
net
{
/// A bidirectional network communication endpoint.
struct
network_socket
:
abstract_socket
<
network_socket
>
{
using
super
=
abstract_socket
<
network_socket
>
;
...
...
@@ -42,10 +43,6 @@ struct network_socket : abstract_socket<network_socket> {
}
};
/// Identifies the invalid socket.
/// @relates network_socket
constexpr
auto
invalid_network_socket
=
network_socket
{
invalid_socket_id
};
/// Enables or disables keepalive on `x`.
/// @relates network_socket
error
keepalive
(
network_socket
x
,
bool
new_value
);
...
...
libcaf_net/caf/net/pipe_socket.hpp
View file @
0d121f35
...
...
@@ -30,6 +30,7 @@
namespace
caf
{
namespace
net
{
/// A unidirectional communication endpoint for inter-process communication.
struct
pipe_socket
:
abstract_socket
<
pipe_socket
>
{
using
super
=
abstract_socket
<
pipe_socket
>
;
...
...
libcaf_net/src/network_socket.cpp
View file @
0d121f35
...
...
@@ -132,7 +132,7 @@ error allow_sigpipe(network_socket x, bool new_value) {
error
allow_udp_connreset
(
network_socket
x
,
bool
)
{
// SIO_UDP_CONNRESET only exists on Windows
if
(
x
==
invalid_
network_
socket
)
if
(
x
==
invalid_socket
)
return
make_error
(
sec
::
network_syscall_failed
,
"WSAIoctl"
,
"invalid socket"
);
return
none
;
...
...
libcaf_net/test/network_socket.cpp
View file @
0d121f35
...
...
@@ -30,7 +30,7 @@ using namespace caf::net;
CAF_TEST_FIXTURE_SCOPE
(
network_socket_tests
,
host_fixture
)
CAF_TEST
(
invalid
socket
)
{
auto
x
=
invalid_network_socket
;
network_socket
x
;
CAF_CHECK_EQUAL
(
keepalive
(
x
,
true
),
sec
::
network_syscall_failed
);
CAF_CHECK_EQUAL
(
tcp_nodelay
(
x
,
true
),
sec
::
network_syscall_failed
);
CAF_CHECK_EQUAL
(
allow_sigpipe
(
x
,
true
),
sec
::
network_syscall_failed
);
...
...
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