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
d81e4e93
Commit
d81e4e93
authored
Mar 18, 2023
by
Dominik Charousset
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Rename ssl::{ => tcp_}acceptor
parent
d6461dac
Changes
18
Hide whitespace changes
Inline
Side-by-side
Showing
18 changed files
with
43 additions
and
167 deletions
+43
-167
libcaf_net/CMakeLists.txt
libcaf_net/CMakeLists.txt
+1
-2
libcaf_net/caf/detail/shared_ssl_acceptor.hpp
libcaf_net/caf/detail/shared_ssl_acceptor.hpp
+0
-73
libcaf_net/caf/net/dsl/client_factory_base.hpp
libcaf_net/caf/net/dsl/client_factory_base.hpp
+1
-1
libcaf_net/caf/net/dsl/has_accept.hpp
libcaf_net/caf/net/dsl/has_accept.hpp
+4
-4
libcaf_net/caf/net/dsl/has_ctx.hpp
libcaf_net/caf/net/dsl/has_ctx.hpp
+2
-2
libcaf_net/caf/net/dsl/server_factory_base.hpp
libcaf_net/caf/net/dsl/server_factory_base.hpp
+0
-1
libcaf_net/caf/net/http/server_factory.hpp
libcaf_net/caf/net/http/server_factory.hpp
+0
-1
libcaf_net/caf/net/http/with.hpp
libcaf_net/caf/net/http/with.hpp
+0
-1
libcaf_net/caf/net/length_prefix_framing.hpp
libcaf_net/caf/net/length_prefix_framing.hpp
+1
-1
libcaf_net/caf/net/lp/server_factory.hpp
libcaf_net/caf/net/lp/server_factory.hpp
+0
-1
libcaf_net/caf/net/lp/with.hpp
libcaf_net/caf/net/lp/with.hpp
+0
-1
libcaf_net/caf/net/prometheus/server_factory.hpp
libcaf_net/caf/net/prometheus/server_factory.hpp
+0
-1
libcaf_net/caf/net/prometheus/with.hpp
libcaf_net/caf/net/prometheus/with.hpp
+0
-1
libcaf_net/caf/net/ssl/tcp_acceptor.hpp
libcaf_net/caf/net/ssl/tcp_acceptor.hpp
+16
-15
libcaf_net/caf/net/web_socket/server_factory.hpp
libcaf_net/caf/net/web_socket/server_factory.hpp
+0
-1
libcaf_net/caf/net/web_socket/with.hpp
libcaf_net/caf/net/web_socket/with.hpp
+0
-1
libcaf_net/src/detail/shared_ssl_acceptor.cpp
libcaf_net/src/detail/shared_ssl_acceptor.cpp
+0
-45
libcaf_net/src/net/ssl/tcp_acceptor.cpp
libcaf_net/src/net/ssl/tcp_acceptor.cpp
+18
-15
No files found.
libcaf_net/CMakeLists.txt
View file @
d81e4e93
...
...
@@ -31,7 +31,6 @@ caf_add_component(
SOURCES
src/detail/convert_ip_endpoint.cpp
src/detail/rfc6455.cpp
src/detail/shared_ssl_acceptor.cpp
src/net/abstract_actor_shell.cpp
src/net/actor_shell.cpp
src/net/binary/default_trait.cpp
...
...
@@ -63,7 +62,6 @@ caf_add_component(
src/net/socket.cpp
src/net/socket_event_layer.cpp
src/net/socket_manager.cpp
src/net/ssl/acceptor.cpp
src/net/ssl/connection.cpp
src/net/ssl/context.cpp
src/net/ssl/dtls.cpp
...
...
@@ -71,6 +69,7 @@ caf_add_component(
src/net/ssl/format.cpp
src/net/ssl/password.cpp
src/net/ssl/startup.cpp
src/net/ssl/tcp_acceptor.cpp
src/net/ssl/tls.cpp
src/net/ssl/transport.cpp
src/net/ssl/verify.cpp
...
...
libcaf_net/caf/detail/shared_ssl_acceptor.hpp
deleted
100644 → 0
View file @
d6461dac
// This file is part of CAF, the C++ Actor Framework. See the file LICENSE in
// the main distribution directory for license terms and copyright or visit
// https://github.com/actor-framework/actor-framework/blob/master/LICENSE.
#pragma once
#include "caf/detail/net_export.hpp"
#include "caf/expected.hpp"
#include "caf/net/ssl/context.hpp"
#include "caf/net/ssl/fwd.hpp"
#include "caf/net/tcp_accept_socket.hpp"
#include <variant>
namespace
caf
::
detail
{
/// Like @ref net::ssl::acceptor but with a `shared_ptr` to the context.
class
CAF_NET_EXPORT
shared_ssl_acceptor
{
public:
// -- member types -----------------------------------------------------------
using
transport_type
=
net
::
ssl
::
transport
;
// -- constructors, destructors, and assignment operators --------------------
shared_ssl_acceptor
()
=
delete
;
shared_ssl_acceptor
(
const
shared_ssl_acceptor
&
)
=
default
;
shared_ssl_acceptor
&
operator
=
(
const
shared_ssl_acceptor
&
)
=
default
;
shared_ssl_acceptor
(
shared_ssl_acceptor
&&
other
);
shared_ssl_acceptor
&
operator
=
(
shared_ssl_acceptor
&&
other
);
shared_ssl_acceptor
(
net
::
tcp_accept_socket
fd
,
std
::
shared_ptr
<
net
::
ssl
::
context
>
ctx
)
:
fd_
(
fd
),
ctx_
(
std
::
move
(
ctx
))
{
// nop
}
// -- properties -------------------------------------------------------------
net
::
tcp_accept_socket
fd
()
const
noexcept
{
return
fd_
;
}
net
::
ssl
::
context
&
ctx
()
noexcept
{
return
*
ctx_
;
}
const
net
::
ssl
::
context
&
ctx
()
const
noexcept
{
return
*
ctx_
;
}
private:
net
::
tcp_accept_socket
fd_
;
std
::
shared_ptr
<
net
::
ssl
::
context
>
ctx_
;
};
// -- free functions -----------------------------------------------------------
/// Checks whether `acc` has a valid socket descriptor.
bool
CAF_NET_EXPORT
valid
(
const
shared_ssl_acceptor
&
acc
);
/// Closes the socket of `obj`.
void
CAF_NET_EXPORT
close
(
shared_ssl_acceptor
&
acc
);
/// Tries to accept a new connection on `acc`. On success, wraps the new socket
/// into an SSL @ref connection and returns it.
expected
<
net
::
ssl
::
connection
>
CAF_NET_EXPORT
accept
(
shared_ssl_acceptor
&
acc
);
}
// namespace caf::detail
libcaf_net/caf/net/dsl/client_factory_base.hpp
View file @
d81e4e93
...
...
@@ -8,7 +8,7 @@
#include "caf/net/dsl/base.hpp"
#include "caf/net/dsl/client_config.hpp"
#include "caf/net/fwd.hpp"
#include "caf/net/ssl/acceptor.hpp"
#include "caf/net/ssl/
tcp_
acceptor.hpp"
#include "caf/net/tcp_accept_socket.hpp"
#include <cstdint>
...
...
libcaf_net/caf/net/dsl/has_accept.hpp
View file @
d81e4e93
...
...
@@ -8,7 +8,7 @@
#include "caf/net/dsl/base.hpp"
#include "caf/net/dsl/server_config.hpp"
#include "caf/net/fwd.hpp"
#include "caf/net/ssl/acceptor.hpp"
#include "caf/net/ssl/
tcp_
acceptor.hpp"
#include "caf/net/tcp_accept_socket.hpp"
#include <cstdint>
...
...
@@ -42,9 +42,9 @@ public:
/// Creates an `accept_factory` object for the given acceptor.
///
/// @param acc The SSL acceptor for incoming connections.
/// @param acc The SSL acceptor for incoming
TCP
connections.
/// @returns an `accept_factory` object that will start a server on `acc`.
auto
accept
(
ssl
::
acceptor
acc
)
{
auto
accept
(
ssl
::
tcp_
acceptor
acc
)
{
auto
&
dref
=
static_cast
<
Subtype
&>
(
*
this
);
auto
&
cfg
=
dref
.
config
();
auto
ptr
=
cfg
.
as_has_ctx
();
...
...
@@ -53,7 +53,7 @@ public:
return
dref
.
make
(
server_config
::
fail_v
,
cfg
,
cfg
.
cannot_add_ctx
());
}
else
if
(
ptr
->
ctx
)
{
auto
err
=
make_error
(
sec
::
logic_error
,
"passed an ssl::acceptor to a factory "
"passed an ssl::
tcp_
acceptor to a factory "
"with a valid SSL context"
);
return
dref
.
make
(
server_config
::
fail_v
,
std
::
move
(
err
));
}
else
{
...
...
libcaf_net/caf/net/dsl/has_ctx.hpp
View file @
d81e4e93
...
...
@@ -5,9 +5,9 @@
#pragma once
#include "caf/expected.hpp"
#include "caf/net/ssl/acceptor.hpp"
#include "caf/net/ssl/connection.hpp"
#include "caf/net/ssl/context.hpp"
#include "caf/net/ssl/tcp_acceptor.hpp"
#include "caf/net/stream_socket.hpp"
#include <memory>
...
...
@@ -46,7 +46,7 @@ public:
auto
acceptor_with_ctx
(
F
&&
f
)
{
return
[
this
,
g
=
std
::
forward
<
F
>
(
f
)](
auto
fd
)
mutable
{
if
(
ctx
)
{
auto
acc
=
ssl
::
acceptor
{
fd
,
std
::
move
(
*
ctx
)};
auto
acc
=
ssl
::
tcp_
acceptor
{
fd
,
std
::
move
(
*
ctx
)};
return
g
(
acc
);
}
else
return
g
(
fd
);
...
...
libcaf_net/caf/net/dsl/server_factory_base.hpp
View file @
d81e4e93
...
...
@@ -8,7 +8,6 @@
#include "caf/net/dsl/base.hpp"
#include "caf/net/dsl/server_config.hpp"
#include "caf/net/fwd.hpp"
#include "caf/net/ssl/acceptor.hpp"
#include "caf/net/tcp_accept_socket.hpp"
#include <cstdint>
...
...
libcaf_net/caf/net/http/server_factory.hpp
View file @
d81e4e93
...
...
@@ -10,7 +10,6 @@
#include "caf/detail/binary_flow_bridge.hpp"
#include "caf/detail/connection_factory.hpp"
#include "caf/detail/net_export.hpp"
#include "caf/detail/shared_ssl_acceptor.hpp"
#include "caf/fwd.hpp"
#include "caf/net/checked_socket.hpp"
#include "caf/net/dsl/server_factory_base.hpp"
...
...
libcaf_net/caf/net/http/with.hpp
View file @
d81e4e93
...
...
@@ -13,7 +13,6 @@
#include "caf/net/http/request.hpp"
#include "caf/net/http/server_factory.hpp"
#include "caf/net/multiplexer.hpp"
#include "caf/net/ssl/acceptor.hpp"
#include "caf/net/ssl/context.hpp"
#include "caf/net/tcp_accept_socket.hpp"
...
...
libcaf_net/caf/net/length_prefix_framing.hpp
View file @
d81e4e93
...
...
@@ -132,7 +132,7 @@ public:
/// Listens for incoming connection on @p fd.
/// @param sys The host system.
/// @param acc A connection acceptor such as @ref tcp_accept_socket or
/// @ref ssl::acceptor.
/// @ref ssl::
tcp_
acceptor.
/// @param cfg Configures the acceptor. Currently, the only supported
/// configuration parameter is `max-connections`.
template
<
class
Acceptor
>
...
...
libcaf_net/caf/net/lp/server_factory.hpp
View file @
d81e4e93
...
...
@@ -9,7 +9,6 @@
#include "caf/detail/accept_handler.hpp"
#include "caf/detail/binary_flow_bridge.hpp"
#include "caf/detail/connection_factory.hpp"
#include "caf/detail/shared_ssl_acceptor.hpp"
#include "caf/fwd.hpp"
#include "caf/net/checked_socket.hpp"
#include "caf/net/dsl/server_factory_base.hpp"
...
...
libcaf_net/caf/net/lp/with.hpp
View file @
d81e4e93
...
...
@@ -13,7 +13,6 @@
#include "caf/net/lp/client_factory.hpp"
#include "caf/net/lp/server_factory.hpp"
#include "caf/net/multiplexer.hpp"
#include "caf/net/ssl/acceptor.hpp"
#include "caf/net/ssl/context.hpp"
#include "caf/net/tcp_accept_socket.hpp"
...
...
libcaf_net/caf/net/prometheus/server_factory.hpp
View file @
d81e4e93
...
...
@@ -8,7 +8,6 @@
#include "caf/defaults.hpp"
#include "caf/detail/accept_handler.hpp"
#include "caf/detail/connection_factory.hpp"
#include "caf/detail/shared_ssl_acceptor.hpp"
#include "caf/fwd.hpp"
#include "caf/net/checked_socket.hpp"
#include "caf/net/dsl/server_config.hpp"
...
...
libcaf_net/caf/net/prometheus/with.hpp
View file @
d81e4e93
...
...
@@ -9,7 +9,6 @@
#include "caf/net/dsl/has_accept.hpp"
#include "caf/net/dsl/has_context.hpp"
#include "caf/net/prometheus/server_factory.hpp"
#include "caf/net/ssl/acceptor.hpp"
#include "caf/net/ssl/context.hpp"
#include "caf/net/tcp_accept_socket.hpp"
...
...
libcaf_net/caf/net/ssl/acceptor.hpp
→
libcaf_net/caf/net/ssl/
tcp_
acceptor.hpp
View file @
d81e4e93
...
...
@@ -14,8 +14,8 @@
namespace
caf
::
net
::
ssl
{
/// Wraps a
n
accept socket and an SSL context.
class
CAF_NET_EXPORT
acceptor
{
/// Wraps a
TCP
accept socket and an SSL context.
class
CAF_NET_EXPORT
tcp_
acceptor
{
public:
// -- member types -----------------------------------------------------------
...
...
@@ -25,33 +25,34 @@ public:
// -- constructors, destructors, and assignment operators --------------------
acceptor
()
=
delete
;
tcp_
acceptor
()
=
delete
;
acceptor
(
const
acceptor
&
)
=
delete
;
tcp_acceptor
(
const
tcp_
acceptor
&
)
=
delete
;
acceptor
&
operator
=
(
const
acceptor
&
)
=
delete
;
tcp_acceptor
&
operator
=
(
const
tcp_
acceptor
&
)
=
delete
;
acceptor
(
acceptor
&&
other
);
tcp_acceptor
(
tcp_
acceptor
&&
other
);
acceptor
&
operator
=
(
acceptor
&&
other
);
tcp_acceptor
&
operator
=
(
tcp_
acceptor
&&
other
);
acceptor
(
tcp_accept_socket
fd
,
context
ctx
)
:
fd_
(
fd
),
ctx_
(
std
::
move
(
ctx
))
{
tcp_acceptor
(
tcp_accept_socket
fd
,
context
ctx
)
:
fd_
(
fd
),
ctx_
(
std
::
move
(
ctx
))
{
// nop
}
// -- factories --------------------------------------------------------------
static
expected
<
acceptor
>
static
expected
<
tcp_
acceptor
>
make_with_cert_file
(
tcp_accept_socket
fd
,
const
char
*
cert_file_path
,
const
char
*
key_file_path
,
format
file_format
=
format
::
pem
);
static
expected
<
acceptor
>
static
expected
<
tcp_
acceptor
>
make_with_cert_file
(
uint16_t
port
,
const
char
*
cert_file_path
,
const
char
*
key_file_path
,
format
file_format
=
format
::
pem
);
static
expected
<
acceptor
>
static
expected
<
tcp_
acceptor
>
make_with_cert_file
(
tcp_accept_socket
fd
,
const
std
::
string
&
cert_file_path
,
const
std
::
string
&
key_file_path
,
format
file_format
=
format
::
pem
)
{
...
...
@@ -59,7 +60,7 @@ public:
key_file_path
.
c_str
(),
file_format
);
}
static
expected
<
acceptor
>
static
expected
<
tcp_
acceptor
>
make_with_cert_file
(
uint16_t
port
,
const
std
::
string
&
cert_file_path
,
const
std
::
string
&
key_file_path
,
format
file_format
=
format
::
pem
)
{
...
...
@@ -89,13 +90,13 @@ private:
// -- free functions -----------------------------------------------------------
/// Checks whether `acc` has a valid socket descriptor.
bool
CAF_NET_EXPORT
valid
(
const
acceptor
&
acc
);
bool
CAF_NET_EXPORT
valid
(
const
tcp_
acceptor
&
acc
);
/// Closes the socket of `obj`.
void
CAF_NET_EXPORT
close
(
acceptor
&
acc
);
void
CAF_NET_EXPORT
close
(
tcp_
acceptor
&
acc
);
/// Tries to accept a new connection on `acc`. On success, wraps the new socket
/// into an SSL @ref connection and returns it.
expected
<
connection
>
CAF_NET_EXPORT
accept
(
acceptor
&
acc
);
expected
<
connection
>
CAF_NET_EXPORT
accept
(
tcp_
acceptor
&
acc
);
}
// namespace caf::net::ssl
libcaf_net/caf/net/web_socket/server_factory.hpp
View file @
d81e4e93
...
...
@@ -10,7 +10,6 @@
#include "caf/detail/accept_handler.hpp"
#include "caf/detail/binary_flow_bridge.hpp"
#include "caf/detail/connection_factory.hpp"
#include "caf/detail/shared_ssl_acceptor.hpp"
#include "caf/detail/ws_flow_bridge.hpp"
#include "caf/fwd.hpp"
#include "caf/net/dsl/server_factory_base.hpp"
...
...
libcaf_net/caf/net/web_socket/with.hpp
View file @
d81e4e93
...
...
@@ -10,7 +10,6 @@
#include "caf/net/dsl/has_context.hpp"
#include "caf/net/dsl/has_uri_connect.hpp"
#include "caf/net/multiplexer.hpp"
#include "caf/net/ssl/acceptor.hpp"
#include "caf/net/ssl/context.hpp"
#include "caf/net/tcp_accept_socket.hpp"
#include "caf/net/web_socket/client_factory.hpp"
...
...
libcaf_net/src/detail/shared_ssl_acceptor.cpp
deleted
100644 → 0
View file @
d6461dac
// This file is part of CAF, the C++ Actor Framework. See the file LICENSE in
// the main distribution directory for license terms and copyright or visit
// https://github.com/actor-framework/actor-framework/blob/master/LICENSE.
#include "caf/detail/shared_ssl_acceptor.hpp"
#include "caf/expected.hpp"
#include "caf/net/ssl/connection.hpp"
#include "caf/net/tcp_stream_socket.hpp"
namespace
caf
::
detail
{
// -- constructors, destructors, and assignment operators ----------------------
shared_ssl_acceptor
::
shared_ssl_acceptor
(
shared_ssl_acceptor
&&
other
)
:
fd_
(
other
.
fd_
),
ctx_
(
std
::
move
(
other
.
ctx_
))
{
other
.
fd_
.
id
=
net
::
invalid_socket_id
;
}
shared_ssl_acceptor
&
shared_ssl_acceptor
::
operator
=
(
shared_ssl_acceptor
&&
other
)
{
fd_
=
other
.
fd_
;
ctx_
=
std
::
move
(
other
.
ctx_
);
other
.
fd_
.
id
=
net
::
invalid_socket_id
;
return
*
this
;
}
// -- free functions -----------------------------------------------------------
bool
valid
(
const
shared_ssl_acceptor
&
acc
)
{
return
valid
(
acc
.
fd
());
}
void
close
(
shared_ssl_acceptor
&
acc
)
{
close
(
acc
.
fd
());
}
expected
<
net
::
ssl
::
connection
>
accept
(
shared_ssl_acceptor
&
acc
)
{
auto
fd
=
accept
(
acc
.
fd
());
if
(
fd
)
return
acc
.
ctx
().
new_connection
(
*
fd
);
return
expected
<
net
::
ssl
::
connection
>
{
std
::
move
(
fd
.
error
())};
}
}
// namespace caf::detail
libcaf_net/src/net/ssl/acceptor.cpp
→
libcaf_net/src/net/ssl/
tcp_
acceptor.cpp
View file @
d81e4e93
...
...
@@ -2,7 +2,7 @@
// the main distribution directory for license terms and copyright or visit
// https://github.com/actor-framework/actor-framework/blob/master/LICENSE.
#include "caf/net/ssl/acceptor.hpp"
#include "caf/net/ssl/
tcp_
acceptor.hpp"
#include "caf/expected.hpp"
#include "caf/net/ssl/connection.hpp"
...
...
@@ -12,12 +12,12 @@ namespace caf::net::ssl {
// -- constructors, destructors, and assignment operators ----------------------
acceptor
::
acceptor
(
acceptor
&&
other
)
tcp_acceptor
::
tcp_acceptor
(
tcp_
acceptor
&&
other
)
:
fd_
(
other
.
fd_
),
ctx_
(
std
::
move
(
other
.
ctx_
))
{
other
.
fd_
.
id
=
invalid_socket_id
;
}
acceptor
&
acceptor
::
operator
=
(
acceptor
&&
other
)
{
tcp_acceptor
&
tcp_acceptor
::
operator
=
(
tcp_
acceptor
&&
other
)
{
fd_
=
other
.
fd_
;
ctx_
=
std
::
move
(
other
.
ctx_
);
other
.
fd_
.
id
=
invalid_socket_id
;
...
...
@@ -26,9 +26,11 @@ acceptor& acceptor::operator=(acceptor&& other) {
// -- factories ----------------------------------------------------------------
expected
<
acceptor
>
acceptor
::
make_with_cert_file
(
tcp_accept_socket
fd
,
const
char
*
cert_file_path
,
const
char
*
key_file_path
,
format
file_format
)
{
expected
<
tcp_acceptor
>
tcp_acceptor
::
make_with_cert_file
(
tcp_accept_socket
fd
,
const
char
*
cert_file_path
,
const
char
*
key_file_path
,
format
file_format
)
{
auto
ctx
=
context
::
make_server
(
tls
::
any
);
if
(
!
ctx
)
{
return
{
make_error
(
sec
::
runtime_error
,
"unable to create SSL context"
)};
...
...
@@ -41,15 +43,16 @@ acceptor::make_with_cert_file(tcp_accept_socket fd, const char* cert_file_path,
return
{
make_error
(
sec
::
runtime_error
,
"unable to load private key file"
,
ctx
->
last_error_string
())};
}
return
{
acceptor
{
fd
,
std
::
move
(
*
ctx
)}};
return
{
tcp_
acceptor
{
fd
,
std
::
move
(
*
ctx
)}};
}
expected
<
acceptor
>
acceptor
::
make_with_cert_file
(
uint16_t
port
,
const
char
*
cert_file_path
,
const
char
*
key_file_path
,
format
file_format
)
{
expected
<
tcp_acceptor
>
tcp_acceptor
::
make_with_cert_file
(
uint16_t
port
,
const
char
*
cert_file_path
,
const
char
*
key_file_path
,
format
file_format
)
{
if
(
auto
fd
=
make_tcp_accept_socket
(
port
))
{
return
acceptor
::
make_with_cert_file
(
*
fd
,
cert_file_path
,
key_file_path
,
file_format
);
return
tcp_
acceptor
::
make_with_cert_file
(
*
fd
,
cert_file_path
,
key_file_path
,
file_format
);
}
else
{
return
{
make_error
(
sec
::
cannot_open_port
)};
}
...
...
@@ -57,15 +60,15 @@ acceptor::make_with_cert_file(uint16_t port, const char* cert_file_path,
// -- free functions -----------------------------------------------------------
bool
valid
(
const
acceptor
&
acc
)
{
bool
valid
(
const
tcp_
acceptor
&
acc
)
{
return
valid
(
acc
.
fd
());
}
void
close
(
acceptor
&
acc
)
{
void
close
(
tcp_
acceptor
&
acc
)
{
close
(
acc
.
fd
());
}
expected
<
connection
>
accept
(
acceptor
&
acc
)
{
expected
<
connection
>
accept
(
tcp_
acceptor
&
acc
)
{
auto
fd
=
accept
(
acc
.
fd
());
if
(
fd
)
return
acc
.
ctx
().
new_connection
(
*
fd
);
...
...
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