mirror of
https://github.com/pocoproject/poco.git
synced 2025-04-01 09:24:55 +02:00
fix(WebSocket): re-add assignment operators
This commit is contained in:
parent
63b4bfd8ba
commit
163509eb57
@ -107,6 +107,34 @@ WebSocket& WebSocket::operator = (const Socket& socket)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
#ifdef POCO_NEW_STATE_ON_MOVE
|
||||||
|
|
||||||
|
WebSocket& WebSocket::operator = (Socket&& socket)
|
||||||
|
{
|
||||||
|
if (dynamic_cast<WebSocketImpl*>(socket.impl()))
|
||||||
|
Socket::operator = (std::move(socket));
|
||||||
|
else
|
||||||
|
throw InvalidArgumentException("Cannot assign incompatible socket");
|
||||||
|
return *this;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
WebSocket& WebSocket::operator = (WebSocket&& socket)
|
||||||
|
{
|
||||||
|
Socket::operator = (std::move(socket));
|
||||||
|
return *this;
|
||||||
|
}
|
||||||
|
|
||||||
|
#endif // POCO_NEW_STATE_ON_MOVE
|
||||||
|
|
||||||
|
|
||||||
|
WebSocket& WebSocket::operator = (const WebSocket& socket)
|
||||||
|
{
|
||||||
|
Socket::operator = (socket);
|
||||||
|
return *this;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
int WebSocket::shutdown()
|
int WebSocket::shutdown()
|
||||||
{
|
{
|
||||||
return shutdown(WS_NORMAL_CLOSE);
|
return shutdown(WS_NORMAL_CLOSE);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user