...
This commit is contained in:
parent
addd13d826
commit
a5c5e5057a
@ -174,7 +174,6 @@ public:
|
||||
}
|
||||
|
||||
netservice_t srv{_ioContext};
|
||||
srv._socket = AdcNetServiceASIOBase::socket_t{_ioContext};
|
||||
|
||||
_socket = AdcNetServiceASIOBase::socket_t{_ioContext};
|
||||
auto timer = getDeadlineTimer(_acceptor, timeout);
|
||||
@ -203,7 +202,7 @@ public:
|
||||
case handshake_state:
|
||||
state = stop_state;
|
||||
|
||||
handshake();
|
||||
|
||||
break;
|
||||
case stop_state:
|
||||
finalize();
|
||||
@ -272,7 +271,7 @@ public:
|
||||
static constexpr std::chrono::duration DEFAULT_RECEIVE_TIMEOUT = std::chrono::seconds(5);
|
||||
|
||||
AdcNetServiceASIOBase(asio::io_context& ctx)
|
||||
: SESSION_PROTOT(), _ioContext(ctx), _receiveStrand(_ioContext), _receiveQueue(), _socket(_ioContext)
|
||||
: SESSION_PROTOT(), _ioContext(ctx), _receiveStrand(_ioContext), _socket(_ioContext), _receiveQueue()
|
||||
{
|
||||
}
|
||||
|
||||
@ -292,12 +291,11 @@ public:
|
||||
AdcNetServiceASIOBase(AdcNetServiceASIOBase&& other)
|
||||
: _ioContext(other._ioContext),
|
||||
_receiveStrand(std::move(other._receiveStrand)),
|
||||
_receiveQueue(),
|
||||
_socket(std::move(other._socket)),
|
||||
_streamBuffer()
|
||||
_streamBuffer(),
|
||||
_receiveQueue(std::move(other._receiveQueue))
|
||||
|
||||
{
|
||||
_receiveQueue = std::move(_receiveQueue);
|
||||
auto bytes = asio::buffer_copy(_streamBuffer.prepare(other._streamBuffer.size()), other._streamBuffer.data());
|
||||
_streamBuffer.commit(bytes);
|
||||
}
|
||||
@ -317,7 +315,7 @@ public:
|
||||
{
|
||||
_ioContext = other._ioContext;
|
||||
_receiveStrand = std::move(other._receiveStrand);
|
||||
_receiveQueue = std::move(_receiveQueue);
|
||||
_receiveQueue = std::move(other._receiveQueue);
|
||||
_socket = std::move(other._socket);
|
||||
|
||||
_streamBuffer.consume(_streamBuffer.size());
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user