Build errors have been fixed, but there are build warnings remaining about unsafe conversions, because Visual C++'s network conversion functions have a differing return type to mine. To be fixed in the future.
Before, if you parsed a URL using fr::URL, and a port wasn't explicitly mentioned in the URL, then fr::URL::get_port() would return an empty string.
Now, it will try to detect the port type if none is specified. For example, URLs beginning with http, will be given a port of 80. This is to simplify usage of the URL class.
fr::Listener's destructor wasn't virtual, so children's destructors weren't being called.
fr::TcpListener did not have a destructor, and so did not close its socket on destruction.
fr::SSLListener now uses fr::TcpListener's 'listen' function instead of its own, as a temporary hack, as mbedtls does not support setting the address families.
Added get/set functions to the listeners for their socket descriptors.
Allows the parsing of full URLs into easy chunks. Added as a helper class for users of the library dealing with URLs, and to potentially replace some of the HTTP parsing code in the future.
fr::Http::get_mimetype(filename) will return the mimetype of a given filename or file extention. This should be used to set the 'content-type' header when creating fr::HttpResponses.
Fixed deadlock in fr::Socket::receive.
Fixed fr::Packet's second constructor not delegating to first, causing it's intenal buffer to remain unitialised.
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.
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;