Commit 47679ed2 authored by Joseph Noir's avatar Joseph Noir

Integrate review feedback

parent a442a96c
...@@ -24,7 +24,7 @@ ...@@ -24,7 +24,7 @@
namespace caf { namespace caf {
namespace net { namespace net {
/// A unconnected datagram-oriented network communication endpoint. /// A datagram-oriented network communication endpoint.
struct datagram_socket : abstract_socket<datagram_socket> { struct datagram_socket : abstract_socket<datagram_socket> {
using super = abstract_socket<datagram_socket>; using super = abstract_socket<datagram_socket>;
......
...@@ -39,7 +39,9 @@ error allow_connreset(datagram_socket x, bool new_value) { ...@@ -39,7 +39,9 @@ error allow_connreset(datagram_socket x, bool new_value) {
#else // CAF_WINDOWS #else // CAF_WINDOWS
error allow_connreset(datagram_socket, bool) { error allow_connreset(datagram_socket x, bool) {
if (x == invalid_socket)
return sec::socket_invalid;
// nop; SIO_UDP_CONNRESET only exists on Windows // nop; SIO_UDP_CONNRESET only exists on Windows
return none; return none;
} }
......
...@@ -27,9 +27,5 @@ using namespace caf::net; ...@@ -27,9 +27,5 @@ using namespace caf::net;
CAF_TEST(invalid_socket) { CAF_TEST(invalid_socket) {
datagram_socket x; datagram_socket x;
#ifdef CAF_WINDOWS CAF_CHECK_NOT_EQUAL(allow_connreset(x, true), none);
CAF_CHECK_EQUAL(allow_connreset(x, true), sec::network_syscall_failed);
#else // CAF_WINDOWS
CAF_CHECK_EQUAL(allow_connreset(x, true), none);
#endif // CAF_WINDOWS
} }
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment