Added SocketReactor & fixes
Sockets will immediately return fr::Socket::Status::Disconnected if an attempt to send/receive data is made whilst the connection is closed. Added SocketReactor, which is effectively a little wrapper around fr::SocketSelector, but can automatically call a callback for a socket when data is received on it.
This commit is contained in:
@@ -65,6 +65,7 @@ namespace fr
|
||||
|
||||
if(read == MBEDTLS_ERR_SSL_PEER_CLOSE_NOTIFY)
|
||||
{
|
||||
is_connected = false;
|
||||
return Socket::Status::Disconnected;
|
||||
}
|
||||
else if(read <= 0)
|
||||
|
||||
Reference in New Issue
Block a user