I ended up having to edit CMakeLists.txt a bit to get it to work out.
So I modified the versioning in version.h to utilize the new variable I made.
No functionality is changed, just worked on the build system.
Replaced instances of resize&memcpy with append, which gives a noticeable performance boost.
fr::Packet::operator<<(const char *str) no longer converts str into an std::string before adding it, removing an unneeded copy.
fr::Packet::clear no longer calls erase, should result in more of the internal buffer remaining allocated.
Framing for std::vector's has been changed from a uint64_t to a uint32_t (breaking change for packet framing!)
Added Sha1 hash, and Base64 encode implementations which are optionally compiled if websock support is enabled, to assist in the WebSock handshake.
Added WebSocket to manage the WebSock protocol during connections.
Added WebFrame to allow for sending/receiving data through the WebSock protocol easily.
Both fr::TcpSocket and fr::SSLSocket can have timeouts specified when connecting. This works by putting the socket into non-blocking mode, making a connect, and then selecting on the socket for the requested timeout. If the select times out then we've failed to connect, if it didn't time out then we've connected.
Added the ability to disable certificate verification for SSL sockets which is useful for testing.
Added the ability to specify maximum HTTP request header/body sizes in the CMake build config to prevent a malicious client from causing OOM errors.
Fixed a bug in HttpResponse and HttpRequest parse causing it to abort if the request is invalid in some cases.
Started work on tests for fr::HttpRequest.
Fixed the final POST data variable containing header data it shouldn't (\r\n\r\n).
Fixed fr::Http::header_exists, and family, not converting things to lowercase first.
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.
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.
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.
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.
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;
Added 'HttpSocket', which inherits TcpSocket and adds a receive and send functions for WebRequest objects.
WebRequest objects can be used to parse, construct and extract HTTP requests. They can be sent through HttpSocket's.