Can be used by inheriting the 'pack' and 'unpack' members of fr::Packetable. The 'pack' function should add your class members to the packet, and the 'unpack' function should take them back out.
Fixed deadlock in fr::Socket::receive.
Fixed fr::Packet's second constructor not delegating to first, causing it's intenal buffer to remain unitialised.
Greatly improvded fr::Packet>> performance.
Added buffer overflow protection to fr::Packet>>.
Added fr::Packet::reset_read_cursor to reset the packet data read position back to the beginning.
In Windows, if fr::SocketSelector::wait(...) was called, and the socket selector was empty, then an exception would be thrown as a result of Windows behaving differently to UNIX sockets. Now, the call will sleep for timeout before returning false, to match UNIX behaviour.
Send/Recv often needs to be called multiple times to transfer all of the data. send_raw/receive_raw are now mutex protected and so both send & receive can be called simultaneously.
SocketReactor actually calls callbacks.
receive_all no longer tries to access out of bound array indexes.
fr::Packet constructor can now take as many arguments as you like and they'll be added to it automatically.
Added bool fr::Packet<< operator overload.
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.
The CMake build system now uses a relative path for modules, and supports a 'USE_SSL' option to optionally link in mbedtls and enable SSL support.
The readme now provides SSL examples.
You can now accept SSL connections using SSLListeners, and then send/receive data through the associated SSLSocket.
HttpSocket's now support both HTTP and HTTPS, using templates:
fr::HttpSocket<fr::SSLSocket> https_socket;
fr::HttpSocket<fr::TcpSocket> http_socket;