Whilst receiving data, the SSL socket would not return if the remote socket disconnected, leading to it blocking indefinitely.
Whilst sending enough data to require multiple writes, the socket would disconnect instead of sending more. This has also been fixed.
Recv's return value was being checked to see if it was greater or equal to 0, if everything was okay. 0 indicates connection closed, and so the socket should have disconnected instead of returning Success.
fr::HttpSocket has been removed.
fr::Sendable has been added. Classes can inherit this if they want to be sendable through sockets. Both fr::Http (which is inherited by fr::HttpRequest and fr::HttpResponse), and fr::Packet inherit this, to allow them to be sent through fr::Socket::send()/fr::Socket::receive().
Fixed broken fr::SocketSelector and fr::SocketReactor, as they no longer accepted fr::Listener's due to fr::Listener no longer inheriting fr::Socket.
Fixed Content-Length header being added to Http responses even if there's a pre-existing one.
Fixed header parsing sometimes adding a carriage return to the header value.
Removed useless copy/move constructors from HttpResponse, causing issues.
fr::TcpSocket checked if the recv response was greater than 0, which created issues as 0 is a valid result if no data was received and no error occurred.
fr::HttpResponse::construct() now adds in a content-length header.
fr::HttpResponse::parse trims the body if it's larger than content length.
fr::Http::set_uri() now prepends a '/' if one's not provided.
Fixed fr::Http::parse_header from cutting off the end of headers.
Examples can now be automatically built with the project, if enabled. And I've cleaned up MiaoDX's examples to be more compliant with frnetlib's coding style.
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.