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:
Cloaked9000
2016-12-20 11:33:31 +00:00
parent 7017b64a15
commit 70779fbe9c
5 changed files with 102 additions and 1 deletions
+1
View File
@@ -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)