Small and fast cross-platform networking library, with support for messaging, IPv6, HTTP, SSL and WebSocket.

frnetlib

Build Status

Frnetlib, is a cross-platform, small and fast networking library written in C++. There are no library dependencies (unless you want to use SSL, in which case MbedTLS is required), and it should compile fine with any C++11 compliant compiler. The API should be considered relatively stable, but things could change as new features are added, or existing ones changed.

Frnetlib is tested on both Linux and Windows and currently supports:

  • HTTP/HTTPS clients
  • HTTP/HTTPS servers
  • WebSocket clients
  • WebSocket servers
  • Raw socket communication
  • Framed messaging of inbuilt and custom types

Connecting to a Socket:

#include <TcpSocket.h>

fr::TcpSocket socket;
if(socket.connect("127.0.0.1", "8081", std::chrono::seconds(10)) != fr::Socket::Status::Success)
{
    //Failed to connect
}

Here, we create a new fr::TcpSocket and connect it to an address. Simple. fr::TcpSocket is the core class, used to send and receive data over TCP, either with frnetlib's own message framing, or raw data for communicating with other protocols. Unfortunately, UDP is not supported at this point. Sockets are blocking by default.

Listening and accepting connections:

#include <TcpSocket.h>
#include <TcpListener.h>

fr::TcpListener listener;

//Bind to a port
if(listener.listen("8081") != fr::Socket::Status::Success)
{
    //Failed to bind to port
}

//Accept a connection
fr::TcpSocket client;
if(listener.accept(client) != fr::Socket::Status::Success)
{
    //Failed to accept a new connection
}

Here we create a new fr::TcpListener, which is used to listen for incoming connections and accept them. Calling fr::TcpListener::listen(port) will bind the listener to a port, allowing you to receive connections on that port. Next a new fr::TcpSocket is created, which is where the accepted connection is stored, to send data through the new connection, we do so though 'client' from now on. fr::TcpListener's can accept as many new connections as you want. You don't need a new one for each client.

Using SSL

#include <SSLSocket.h>
#include <SSLContext.h>
#include <SSLListener.h>

std::shared_ptr<fr::SSLContext> ssl_context(new fr::SSLContext("certs.crt")); //Creates a new 'SSL' context. This stores certificates and is shared between SSL enabled objects.
ssl_conext->load_ca_certs_from_file(filepath); //This, or 'load_ca_certs_from_memory' should be called on the context, to load your SSL certificates.

fr::SSLListener listener(ssl_context, "crt_path", "pem_path", "private_key_path"); //This is the SSL equivilent to fr::TcpListener

fr::SSLSocket socket(ssl_context); //This is the SSL equivilent to fr::TcpSocket

As you've probably noticed, everything unencrypted has it's equivalent encrypted counterpart, usually just by replacing 'TCP' with 'SSL' and providing an SSLContext object. fr::SSLContext stores SSL information which need not be duplicated across each socket and listener, such as the random number generator, and public key list. It is important to build mbedtls with thread protection enabled, if your program is multithreaded. This SSLContext object can then be passed to any SSL sockets or listeners which you may create.

SSLListener accepts a lot more arguments than its unencrypted counterpart, TcpListener, and it needs the filepaths to your SSL certificates and keys to properly authenticate with clients.

Sending packets:

#include <Packet.h>

fr::Packet packet;
packet << "Hello there, I am" << (float)1.2 << "years old";

if(socket.send(packet) != fr::Socket::Status::Success)
{
    //Failed to send packet
}

To send messages using frnetlib's framing, use fr::Packet. Data added to the packet, using the '<<' operator will automatically be packed and converted to network byte order if applicable. The data should be unpacked using the '>>' operator in the same order as it was packed. It is important to explicitly typecast non-strings as shown above, otherwise the compiler might interpret '10' as a uint16_t instead of a uint32_t like you might have wanted, scrambling the data. To send the packet, just call fr::TcpSocket::send.

Receiving packets:

fr::Packet packet;
if(client.receive(packet) != fr::Socket::Status::Success)
{
    //Failed to receive packet
}

std::string str1, str2;
float age;
packet >> str1 >> age >> str2;

Effectively the reverse of sending packets. We call fr::TcpSocket::receive, passing it a fr::Packet object, to receive a packet, and then extract the data in the same order that we packed it. fr::Socket::receive is blocking by default, but you can toggle this using fr::Socket::set_blocking(). If the socket is blocking when you call receive, it will wait until data has been received before returning. If the socket is non-blocking, then it will return immediately, even if the socket is not ready to receive data. If the socket is non-blocking and is not ready to receive data when you call receive, then it will return a fr::Socket::Status::WouldBlock value.

A simple HTTP server:

#include <HttpRequest.h>
#include <HttpResponse.h>

fr::TcpSocket client;                 //fr::TcpSocket for HTTP. fr::SSLSocket for HTTPS.
fr::TcpListener listener;             //Use an fr::SSLListener if HTTPS.

//Bind to a port
if(listener.listen("8081") != fr::Socket::Status::Success)
{
    //Failed to bind to port
}

while(true)
{
    //Accept a new connection
    if(listener.accept(client) != fr::Socket::Status::Success)
    {
        //Failed to accept client
    }

    //Receive client HTTP request
    fr::HttpRequest request;
    if(client.receive(request) != fr::Socket::Status::Success)
    {
        //Failed to receive request
    }

    //Construct a response
    fr::HttpResponse response;
    response.set_body("<h1>Hello, World!</h1>");

    //Send it
    if(client.send(response) != fr::Socket::Status::Success)
    {
        //Failed to send response;
    }

    //Close connection
    client.close_socket();
}

After binding to the port, we infinitely try and receive a new request, construct a response with the body of 'Hello, World!' and send it back to the client before closing the socket. fr::HttpRequest, and fr::HttpResponse both inherit fr::Sendable, which allows them to be sent and received through sockets just like fr::Packets.

fr::HttpRequest objects are used for dealing with data being sent to the server, whereas fr::HttpResponse objects are used for dealing with data being sent from the server. GET/POST/Header information can be manipulated the same as in the example below.

A simple HTTP client:

#include <HttpRequest.h>
#include <HttpResponse.h>

//Connect to the website example.com on port 80, with a 10 second connection timeout
fr::TcpSocket socket;
if(socket.connect("example.com", "80", std::chrono::seconds(10)) != fr::Socket::Status::Success)
{
    //Failed to connect to site
}

//Construct a request with some data
fr::HttpRequest request;
request.get("name") = "bob";
request.get("age") = 10;
request.post("isalive") = "true";
request["my-header"] = "value";

//Send the request
if(socket.send(request) != fr::Socket::Status::Success)
{
    //Failed to send request
}

//Wait for a response
fr::HttpResponse response;
if(socket.receive(response) != fr::Socket::Status::Success)
{
    //Failed to receive response
}

//Print out the response
std::cout << request.get_body() << std::endl;

Here we create an fr::TcpSocket object, connect to a domain (don't include the 'http://' bit). The socket is non-SSL and so the underlying socket type is fr::TcpSocket. If this were an SSL socket, then it'd be fr::SSLSocket. After connecting, we construct a fr::HttpRequest object to send to the server, adding in some GET arguments, POST arguments and a request header.

You can both set and get GET/POST data through the fr::(HttpRequest/HttpResponse)::(get/post) functions. And access/set headers though the [] operator. Once we've sent a request, we wait for a response. Once received, we print out the body of the response and exit.

Sending custom objects:

class MyClass : public fr::Packetable
{
    int member_a, member_b;

    virtual void pack(fr::Packet &o) const override
    {
        o << member_a << member_b;
    }

    virtual void unpack(fr::Packet &o) override
    {
        o >> member_a >> member_b;
    }
};

You can add support for adding your own classes to fr::Packets, by inheriting fr::Packetable and implementing the 'pack' and 'unpack' functions. Your 'pack' function should add your class members to the provided packet object, and your 'unpack' function should take them back out. This allows for code like this:

MyClass my_class;
fr::Packet packet;
packet << my_class;
packet >> my_class;
Comments
  • fail to build library on ubuntu

    fail to build library on ubuntu

    Hi, I changed in cmakeLists.txt "Enable SSL support" to "OFF" I ran $ cmake . then make make fails with this output:

    
    
    /home/panda/frnetlib-master/examples/simple_http_server_and_client/SimpleHttpServer.cpp: In function ‘int main()’:
    /home/panda/frnetlib-master/examples/simple_http_server_and_client/SimpleHttpServer.cpp:17:55: error: ‘Success’ is not a member of ‘fr::Socket’
         if((err = listener.listen("8081")) != fr::Socket::Success)
                                                           ^~~~~~~
    /home/panda/frnetlib-master/examples/simple_http_server_and_client/SimpleHttpServer.cpp:19:49: error: no match for ‘operator<<’ (operand types are ‘std::basic_ostream<char>’ and ‘fr::Socket::Status’)
             std::cerr << "Failed to bind to port: " << err << std::endl;
             ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~
    In file included from /usr/include/c++/8/iostream:39,
                     from /home/panda/frnetlib-master/examples/simple_http_server_and_client/SimpleHttpServer.cpp:8:
    /usr/include/c++/8/ostream:108:7: note: candidate: ‘std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(std::basic_ostream<_CharT, _Traits>::__ostream_type& (*)(std::basic_ostream<_CharT, _Traits>::__ostream_type&)) [with _CharT = char; _Traits = std::char_traits<char>; std::basic_ostream<_CharT, _Traits>::__ostream_type = std::basic_ostream<char>]’
           operator<<(__ostream_type& (*__pf)(__ostream_type&))
           ^~~~~~~~
    /usr/include/c++/8/ostream:108:7: note:   no known conversion for argument 1 from ‘fr::Socket::Status’ to ‘std::basic_ostream<char>::__ostream_type& (*)(std::basic_ostream<char>::__ostream_type&)’ {aka ‘std::basic_ostream<char>& (*)(std::basic_ostream<char>&)’}
    /usr/include/c++/8/ostream:117:7: note: candidate: ‘std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(std::basic_ostream<_CharT, _Traits>::__ios_type& (*)(std::basic_ostream<_CharT, _Traits>::__ios_type&)) [with _CharT = char; _Traits = std::char_traits<char>; std::basic_ostream<_CharT, _Traits>::__ostream_type = std::basic_ostream<char>; std::basic_ostream<_CharT, _Traits>::__ios_type = std::basic_ios<char>]’
           operator<<(__ios_type& (*__pf)(__ios_type&))
           ^~~~~~~~
    /usr/include/c++/8/ostream:117:7: note:   no known conversion for argument 1 from ‘fr::Socket::Status’ to ‘std::basic_ostream<char>::__ios_type& (*)(std::basic_ostream<char>::__ios_type&)’ {aka ‘std::basic_ios<char>& (*)(std::basic_ios<char>&)’}
    /usr/include/c++/8/ostream:127:7: note: candidate: ‘std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(std::ios_base& (*)(std::ios_base&)) [with _CharT = char; _Traits = std::char_traits<char>; std::basic_ostream<_CharT, _Traits>::__ostream_type = std::basic_ostream<char>]’
           operator<<(ios_base& (*__pf) (ios_base&))
           ^~~~~~~~
    /usr/include/c++/8/ostream:127:7: note:   no known conversion for argument 1 from ‘fr::Socket::Status’ to ‘std::ios_base& (*)(std::ios_base&)’
    /usr/include/c++/8/ostream:166:7: note: candidate: ‘std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(long int) [with _CharT = char; _Traits = std::char_traits<char>; std::basic_ostream<_CharT, _Traits>::__ostream_type = std::basic_ostream<char>]’
           operator<<(long __n)
           ^~~~~~~~
    /usr/include/c++/8/ostream:166:7: note:   no known conversion for argument 1 from ‘fr::Socket::Status’ to ‘long int’
    /usr/include/c++/8/ostream:170:7: note: candidate: ‘std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(long unsigned int) [with _CharT = char; _Traits = std::char_traits<char>; std::basic_ostream<_CharT, _Traits>::__ostream_type = std::basic_ostream<char>]’
           operator<<(unsigned long __n)
           ^~~~~~~~
    /usr/include/c++/8/ostream:170:7: note:   no known conversion for argument 1 from ‘fr::Socket::Status’ to ‘long unsigned int’
    /usr/include/c++/8/ostream:174:7: note: candidate: ‘std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(bool) [with _CharT = char; _Traits = std::char_traits<char>; std::basic_ostream<_CharT, _Traits>::__ostream_type = std::basic_ostream<char>]’
           operator<<(bool __n)
           ^~~~~~~~
    /usr/include/c++/8/ostream:174:7: note:   no known conversion for argument 1 from ‘fr::Socket::Status’ to ‘bool’
    In file included from /usr/include/c++/8/ostream:693,
                     from /usr/include/c++/8/iostream:39,
                     from /home/panda/frnetlib-master/examples/simple_http_server_and_client/SimpleHttpServer.cpp:8:
    /usr/include/c++/8/bits/ostream.tcc:91:5: note: candidate: ‘std::basic_ostream<_CharT, _Traits>& std::basic_ostream<_CharT, _Traits>::operator<<(short int) [with _CharT = char; _Traits = std::char_traits<char>]’
         basic_ostream<_CharT, _Traits>::
         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    /usr/include/c++/8/bits/ostream.tcc:91:5: note:   no known conversion for argument 1 from ‘fr::Socket::Status’ to ‘short int’
    In file included from /usr/include/c++/8/iostream:39,
                     from /home/panda/frnetlib-master/examples/simple_http_server_and_client/SimpleHttpServer.cpp:8:
    /usr/include/c++/8/ostream:181:7: note: candidate: ‘std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(short unsigned int) [with _CharT = char; _Traits = std::char_traits<char>; std::basic_ostream<_CharT, _Traits>::__ostream_type = std::basic_ostream<char>]’
           operator<<(unsigned short __n)
           ^~~~~~~~
    /usr/include/c++/8/ostream:181:7: note:   no known conversion for argument 1 from ‘fr::Socket::Status’ to ‘short unsigned int’
    In file included from /usr/include/c++/8/ostream:693,
                     from /usr/include/c++/8/iostream:39,
                     from /home/panda/frnetlib-master/examples/simple_http_server_and_client/SimpleHttpServer.cpp:8:
    /usr/include/c++/8/bits/ostream.tcc:105:5: note: candidate: ‘std::basic_ostream<_CharT, _Traits>& std::basic_ostream<_CharT, _Traits>::operator<<(int) [with _CharT = char; _Traits = std::char_traits<char>]’
         basic_ostream<_CharT, _Traits>::
         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    /usr/include/c++/8/bits/ostream.tcc:105:5: note:   no known conversion for argument 1 from ‘fr::Socket::Status’ to ‘int’
    In file included from /usr/include/c++/8/iostream:39,
                     from /home/panda/frnetlib-master/examples/simple_http_server_and_client/SimpleHttpServer.cpp:8:
    /usr/include/c++/8/ostream:192:7: note: candidate: ‘std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(unsigned int) [with _CharT = char; _Traits = std::char_traits<char>; std::basic_ostream<_CharT, _Traits>::__ostream_type = std::basic_ostream<char>]’
           operator<<(unsigned int __n)
           ^~~~~~~~
    /usr/include/c++/8/ostream:192:7: note:   no known conversion for argument 1 from ‘fr::Socket::Status’ to ‘unsigned int’
    /usr/include/c++/8/ostream:201:7: note: candidate: ‘std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(long long int) [with _CharT = char; _Traits = std::char_traits<char>; std::basic_ostream<_CharT, _Traits>::__ostream_type = std::basic_ostream<char>]’
           operator<<(long long __n)
           ^~~~~~~~
    /usr/include/c++/8/ostream:201:7: note:   no known conversion for argument 1 from ‘fr::Socket::Status’ to ‘long long int’
    /usr/include/c++/8/ostream:205:7: note: candidate: ‘std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(long long unsigned int) [with _CharT = char; _Traits = std::char_traits<char>; std::basic_ostream<_CharT, _Traits>::__ostream_type = std::basic_ostream<char>]’
           operator<<(unsigned long long __n)
           ^~~~~~~~
    /usr/include/c++/8/ostream:205:7: note:   no known conversion for argument 1 from ‘fr::Socket::Status’ to ‘long long unsigned int’
    /usr/include/c++/8/ostream:220:7: note: candidate: ‘std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(double) [with _CharT = char; _Traits = std::char_traits<char>; std::basic_ostream<_CharT, _Traits>::__ostream_type = std::basic_ostream<char>]’
           operator<<(double __f)
           ^~~~~~~~
    /usr/include/c++/8/ostream:220:7: note:   no known conversion for argument 1 from ‘fr::Socket::Status’ to ‘double’
    /usr/include/c++/8/ostream:224:7: note: candidate: ‘std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(float) [with _CharT = char; _Traits = std::char_traits<char>; std::basic_ostream<_CharT, _Traits>::__ostream_type = std::basic_ostream<char>]’
           operator<<(float __f)
           ^~~~~~~~
    /usr/include/c++/8/ostream:224:7: note:   no known conversion for argument 1 from ‘fr::Socket::Status’ to ‘float’
    /usr/include/c++/8/ostream:232:7: note: candidate: ‘std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(long double) [with _CharT = char; _Traits = std::char_traits<char>; std::basic_ostream<_CharT, _Traits>::__ostream_type = std::basic_ostream<char>]’
           operator<<(long double __f)
           ^~~~~~~~
    /usr/include/c++/8/ostream:232:7: note:   no known conversion for argument 1 from ‘fr::Socket::Status’ to ‘long double’
    /usr/include/c++/8/ostream:245:7: note: candidate: ‘std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(const void*) [with _CharT = char; _Traits = std::char_traits<char>; std::basic_ostream<_CharT, _Traits>::__ostream_type = std::basic_ostream<char>]’
           operator<<(const void* __p)
           ^~~~~~~~
    /usr/include/c++/8/ostream:245:7: note:   no known conversion for argument 1 from ‘fr::Socket::Status’ to ‘const void*’
    In file included from /usr/include/c++/8/ostream:693,
                     from /usr/include/c++/8/iostream:39,
                     from /home/panda/frnetlib-master/examples/simple_http_server_and_client/SimpleHttpServer.cpp:8:
    /usr/include/c++/8/bits/ostream.tcc:119:5: note: candidate: ‘std::basic_ostream<_CharT, _Traits>& std::basic_ostream<_CharT, _Traits>::operator<<(std::basic_ostream<_CharT, _Traits>::__streambuf_type*) [with _CharT = char; _Traits = std::char_traits<char>; std::basic_ostream<_CharT, _Traits>::__streambuf_type = std::basic_streambuf<char>]’
         basic_ostream<_CharT, _Traits>::
         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    /usr/include/c++/8/bits/ostream.tcc:119:5: note:   no known conversion for argument 1 from ‘fr::Socket::Status’ to ‘std::basic_ostream<char>::__streambuf_type*’ {aka ‘std::basic_streambuf<char>*’}
    In file included from /usr/include/c++/8/string:52,
                     from /home/panda/frnetlib-master/include/frnetlib/HttpRequest.h:7,
                     from /home/panda/frnetlib-master/examples/simple_http_server_and_client/SimpleHttpServer.cpp:5:
    /usr/include/c++/8/bits/basic_string.h:6323:5: note: candidate: ‘template<class _CharT, class _Traits, class _Alloc> std::basic_ostream<_CharT, _Traits>& std::operator<<(std::basic_ostream<_CharT, _Traits>&, const std::__cxx11::basic_string<_CharT, _Traits, _Alloc>&)’
         operator<<(basic_ostream<_CharT, _Traits>& __os,
         ^~~~~~~~
    /usr/include/c++/8/bits/basic_string.h:6323:5: note:   template argument deduction/substitution failed:
    /home/panda/frnetlib-master/examples/simple_http_server_and_client/SimpleHttpServer.cpp:19:52: note:   mismatched types ‘const std::__cxx11::basic_string<_CharT, _Traits, _Alloc>’ and ‘fr::Socket::Status’
             std::cerr << "Failed to bind to port: " << err << std::endl;
                                                        ^~~
    In file included from /usr/include/c++/8/memory:81,
                     from /home/panda/frnetlib-master/include/frnetlib/TcpSocket.h:8,
                     from /home/panda/frnetlib-master/include/frnetlib/HttpRequest.h:10,
                     from /home/panda/frnetlib-master/examples/simple_http_server_and_client/SimpleHttpServer.cpp:5:
    /usr/include/c++/8/bits/shared_ptr.h:66:5: note: candidate: ‘template<class _Ch, class _Tr, class _Tp, __gnu_cxx::_Lock_policy _Lp> std::basic_ostream<_CharT, _Traits>& std::operator<<(std::basic_ostream<_CharT, _Traits>&, const std::__shared_ptr<_Tp, _Lp>&)’
         operator<<(std::basic_ostream<_Ch, _Tr>& __os,
         ^~~~~~~~
    /usr/include/c++/8/bits/shared_ptr.h:66:5: note:   template argument deduction/substitution failed:
    /home/panda/frnetlib-master/examples/simple_http_server_and_client/SimpleHttpServer.cpp:19:52: note:   mismatched types ‘const std::__shared_ptr<_Tp, _Lp>’ and ‘fr::Socket::Status’
             std::cerr << "Failed to bind to port: " << err << std::endl;
                                                        ^~~
    In file included from /usr/include/c++/8/mutex:42,
                     from /home/panda/frnetlib-master/include/frnetlib/TcpSocket.h:9,
                     from /home/panda/frnetlib-master/include/frnetlib/HttpRequest.h:10,
                     from /home/panda/frnetlib-master/examples/simple_http_server_and_client/SimpleHttpServer.cpp:5:
    /usr/include/c++/8/system_error:217:5: note: candidate: ‘template<class _CharT, class _Traits> std::basic_ostream<_CharT, _Traits>& std::operator<<(std::basic_ostream<_CharT, _Traits>&, const std::error_code&)’
         operator<<(basic_ostream<_CharT, _Traits>& __os, const error_code& __e)
         ^~~~~~~~
    /usr/include/c++/8/system_error:217:5: note:   template argument deduction/substitution failed:
    /home/panda/frnetlib-master/examples/simple_http_server_and_client/SimpleHttpServer.cpp:19:52: note:   cannot convert ‘err’ (type ‘fr::Socket::Status’) to type ‘const std::error_code&’
             std::cerr << "Failed to bind to port: " << err << std::endl;
                                                        ^~~
    In file included from /usr/include/c++/8/iostream:39,
                     from /home/panda/frnetlib-master/examples/simple_http_server_and_client/SimpleHttpServer.cpp:8:
    /usr/include/c++/8/ostream:497:5: note: candidate: ‘template<class _CharT, class _Traits> std::basic_ostream<_CharT, _Traits>& std::operator<<(std::basic_ostream<_CharT, _Traits>&, _CharT)’
         operator<<(basic_ostream<_CharT, _Traits>& __out, _CharT __c)
         ^~~~~~~~
    /usr/include/c++/8/ostream:497:5: note:   template argument deduction/substitution failed:
    /home/panda/frnetlib-master/examples/simple_http_server_and_client/SimpleHttpServer.cpp:19:52: note:   deduced conflicting types for parameter ‘_CharT’ (‘char’ and ‘fr::Socket::Status’)
             std::cerr << "Failed to bind to port: " << err << std::endl;
                                                        ^~~
    In file included from /usr/include/c++/8/iostream:39,
                     from /home/panda/frnetlib-master/examples/simple_http_server_and_client/SimpleHttpServer.cpp:8:
    /usr/include/c++/8/ostream:502:5: note: candidate: ‘template<class _CharT, class _Traits> std::basic_ostream<_CharT, _Traits>& std::operator<<(std::basic_ostream<_CharT, _Traits>&, char)’
         operator<<(basic_ostream<_CharT, _Traits>& __out, char __c)
         ^~~~~~~~
    /usr/include/c++/8/ostream:502:5: note:   template argument deduction/substitution failed:
    /home/panda/frnetlib-master/examples/simple_http_server_and_client/SimpleHttpServer.cpp:19:52: note:   cannot convert ‘err’ (type ‘fr::Socket::Status’) to type ‘char’
             std::cerr << "Failed to bind to port: " << err << std::endl;
                                                        ^~~
    In file included from /usr/include/c++/8/iostream:39,
                     from /home/panda/frnetlib-master/examples/simple_http_server_and_client/SimpleHttpServer.cpp:8:
    /usr/include/c++/8/ostream:508:5: note: candidate: ‘template<class _Traits> std::basic_ostream<char, _Traits>& std::operator<<(std::basic_ostream<char, _Traits>&, char)’
         operator<<(basic_ostream<char, _Traits>& __out, char __c)
         ^~~~~~~~
    /usr/include/c++/8/ostream:508:5: note:   template argument deduction/substitution failed:
    /home/panda/frnetlib-master/examples/simple_http_server_and_client/SimpleHttpServer.cpp:19:52: note:   cannot convert ‘err’ (type ‘fr::Socket::Status’) to type ‘char’
             std::cerr << "Failed to bind to port: " << err << std::endl;
                                                        ^~~
    In file included from /usr/include/c++/8/iostream:39,
                     from /home/panda/frnetlib-master/examples/simple_http_server_and_client/SimpleHttpServer.cpp:8:
    /usr/include/c++/8/ostream:514:5: note: candidate: ‘template<class _Traits> std::basic_ostream<char, _Traits>& std::operator<<(std::basic_ostream<char, _Traits>&, signed char)’
         operator<<(basic_ostream<char, _Traits>& __out, signed char __c)
         ^~~~~~~~
    /usr/include/c++/8/ostream:514:5: note:   template argument deduction/substitution failed:
    /home/panda/frnetlib-master/examples/simple_http_server_and_client/SimpleHttpServer.cpp:19:52: note:   cannot convert ‘err’ (type ‘fr::Socket::Status’) to type ‘signed char’
             std::cerr << "Failed to bind to port: " << err << std::endl;
                                                        ^~~
    In file included from /usr/include/c++/8/iostream:39,
                     from /home/panda/frnetlib-master/examples/simple_http_server_and_client/SimpleHttpServer.cpp:8:
    /usr/include/c++/8/ostream:519:5: note: candidate: ‘template<class _Traits> std::basic_ostream<char, _Traits>& std::operator<<(std::basic_ostream<char, _Traits>&, unsigned char)’
         operator<<(basic_ostream<char, _Traits>& __out, unsigned char __c)
         ^~~~~~~~
    /usr/include/c++/8/ostream:519:5: note:   template argument deduction/substitution failed:
    /home/panda/frnetlib-master/examples/simple_http_server_and_client/SimpleHttpServer.cpp:19:52: note:   cannot convert ‘err’ (type ‘fr::Socket::Status’) to type ‘unsigned char’
             std::cerr << "Failed to bind to port: " << err << std::endl;
                                                        ^~~
    In file included from /usr/include/c++/8/iostream:39,
                     from /home/panda/frnetlib-master/examples/simple_http_server_and_client/SimpleHttpServer.cpp:8:
    /usr/include/c++/8/ostream:539:5: note: candidate: ‘template<class _CharT, class _Traits> std::basic_ostream<_CharT, _Traits>& std::operator<<(std::basic_ostream<_CharT, _Traits>&, const _CharT*)’
         operator<<(basic_ostream<_CharT, _Traits>& __out, const _CharT* __s)
         ^~~~~~~~
    /usr/include/c++/8/ostream:539:5: note:   template argument deduction/substitution failed:
    /home/panda/frnetlib-master/examples/simple_http_server_and_client/SimpleHttpServer.cpp:19:52: note:   mismatched types ‘const _CharT*’ and ‘fr::Socket::Status’
             std::cerr << "Failed to bind to port: " << err << std::endl;
                                                        ^~~
    In file included from /usr/include/c++/8/ostream:693,
                     from /usr/include/c++/8/iostream:39,
                     from /home/panda/frnetlib-master/examples/simple_http_server_and_client/SimpleHttpServer.cpp:8:
    /usr/include/c++/8/bits/ostream.tcc:321:5: note: candidate: ‘template<class _CharT, class _Traits> std::basic_ostream<_CharT, _Traits>& std::operator<<(std::basic_ostream<_CharT, _Traits>&, const char*)’
         operator<<(basic_ostream<_CharT, _Traits>& __out, const char* __s)
         ^~~~~~~~
    /usr/include/c++/8/bits/ostream.tcc:321:5: note:   template argument deduction/substitution failed:
    /home/panda/frnetlib-master/examples/simple_http_server_and_client/SimpleHttpServer.cpp:19:52: note:   cannot convert ‘err’ (type ‘fr::Socket::Status’) to type ‘const char*’
             std::cerr << "Failed to bind to port: " << err << std::endl;
                                                        ^~~
    In file included from /usr/include/c++/8/iostream:39,
                     from /home/panda/frnetlib-master/examples/simple_http_server_and_client/SimpleHttpServer.cpp:8:
    /usr/include/c++/8/ostream:556:5: note: candidate: ‘template<class _Traits> std::basic_ostream<char, _Traits>& std::operator<<(std::basic_ostream<char, _Traits>&, const char*)’
         operator<<(basic_ostream<char, _Traits>& __out, const char* __s)
         ^~~~~~~~
    /usr/include/c++/8/ostream:556:5: note:   template argument deduction/substitution failed:
    /home/panda/frnetlib-master/examples/simple_http_server_and_client/SimpleHttpServer.cpp:19:52: note:   cannot convert ‘err’ (type ‘fr::Socket::Status’) to type ‘const char*’
             std::cerr << "Failed to bind to port: " << err << std::endl;
                                                        ^~~
    In file included from /usr/include/c++/8/iostream:39,
                     from /home/panda/frnetlib-master/examples/simple_http_server_and_client/SimpleHttpServer.cpp:8:
    /usr/include/c++/8/ostream:569:5: note: candidate: ‘template<class _Traits> std::basic_ostream<char, _Traits>& std::operator<<(std::basic_ostream<char, _Traits>&, const signed char*)’
         operator<<(basic_ostream<char, _Traits>& __out, const signed char* __s)
         ^~~~~~~~
    /usr/include/c++/8/ostream:569:5: note:   template argument deduction/substitution failed:
    /home/panda/frnetlib-master/examples/simple_http_server_and_client/SimpleHttpServer.cpp:19:52: note:   cannot convert ‘err’ (type ‘fr::Socket::Status’) to type ‘const signed char*’
             std::cerr << "Failed to bind to port: " << err << std::endl;
                                                        ^~~
    In file included from /usr/include/c++/8/iostream:39,
                     from /home/panda/frnetlib-master/examples/simple_http_server_and_client/SimpleHttpServer.cpp:8:
    /usr/include/c++/8/ostream:574:5: note: candidate: ‘template<class _Traits> std::basic_ostream<char, _Traits>& std::operator<<(std::basic_ostream<char, _Traits>&, const unsigned char*)’
         operator<<(basic_ostream<char, _Traits>& __out, const unsigned char* __s)
         ^~~~~~~~
    /usr/include/c++/8/ostream:574:5: note:   template argument deduction/substitution failed:
    /home/panda/frnetlib-master/examples/simple_http_server_and_client/SimpleHttpServer.cpp:19:52: note:   cannot convert ‘err’ (type ‘fr::Socket::Status’) to type ‘const unsigned char*’
             std::cerr << "Failed to bind to port: " << err << std::endl;
                                                        ^~~
    In file included from /usr/include/c++/8/iostream:39,
                     from /home/panda/frnetlib-master/examples/simple_http_server_and_client/SimpleHttpServer.cpp:8:
    /usr/include/c++/8/ostream:682:5: note: candidate: ‘template<class _Ostream, class _Tp> typename std::enable_if<std::__and_<std::__not_<std::is_lvalue_reference<_Tp> >, std::__is_convertible_to_basic_ostream<_Ostream>, std::__is_insertable<typename std::__is_convertible_to_basic_ostream<_Tp>::__ostream_type, const _Tp&, void> >::value, typename std::__is_convertible_to_basic_ostream<_Tp>::__ostream_type>::type std::operator<<(_Ostream&&, const _Tp&)’
         operator<<(_Ostream&& __os, const _Tp& __x)
         ^~~~~~~~
    /usr/include/c++/8/ostream:682:5: note:   template argument deduction/substitution failed:
    /usr/include/c++/8/ostream: In substitution of ‘template<class _Ostream, class _Tp> typename std::enable_if<std::__and_<std::__not_<std::is_lvalue_reference<_Tp> >, std::__is_convertible_to_basic_ostream<_Ostream>, std::__is_insertable<typename std::__is_convertible_to_basic_ostream<_Tp>::__ostream_type, const _Tp&, void> >::value, typename std::__is_convertible_to_basic_ostream<_Tp>::__ostream_type>::type std::operator<<(_Ostream&&, const _Tp&) [with _Ostream = std::basic_ostream<char>&; _Tp = fr::Socket::Status]’:
    /home/panda/frnetlib-master/examples/simple_http_server_and_client/SimpleHttpServer.cpp:19:52:   required from here
    /usr/include/c++/8/ostream:682:5: error: no type named ‘type’ in ‘struct std::enable_if<false, std::basic_ostream<char>&>’
    /home/panda/frnetlib-master/examples/simple_http_server_and_client/SimpleHttpServer.cpp:26:59: error: ‘Success’ is not a member of ‘fr::Socket’
             if((err = listener.accept(client)) != fr::Socket::Success)
                                                               ^~~~~~~
    /home/panda/frnetlib-master/examples/simple_http_server_and_client/SimpleHttpServer.cpp:28:62: error: no match for ‘operator<<’ (operand types are ‘std::basic_ostream<char>’ and ‘fr::Socket::Status’)
                 std::cerr << "Failed to accept new connection: " << err << std::endl;
                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~
    In file included from /usr/include/c++/8/iostream:39,
                     from /home/panda/frnetlib-master/examples/simple_http_server_and_client/SimpleHttpServer.cpp:8:
    /usr/include/c++/8/ostream:108:7: note: candidate: ‘std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(std::basic_ostream<_CharT, _Traits>::__ostream_type& (*)(std::basic_ostream<_CharT, _Traits>::__ostream_type&)) [with _CharT = char; _Traits = std::char_traits<char>; std::basic_ostream<_CharT, _Traits>::__ostream_type = std::basic_ostream<char>]’
           operator<<(__ostream_type& (*__pf)(__ostream_type&))
           ^~~~~~~~
    /usr/include/c++/8/ostream:108:7: note:   no known conversion for argument 1 from ‘fr::Socket::Status’ to ‘std::basic_ostream<char>::__ostream_type& (*)(std::basic_ostream<char>::__ostream_type&)’ {aka ‘std::basic_ostream<char>& (*)(std::basic_ostream<char>&)’}
    /usr/include/c++/8/ostream:117:7: note: candidate: ‘std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(std::basic_ostream<_CharT, _Traits>::__ios_type& (*)(std::basic_ostream<_CharT, _Traits>::__ios_type&)) [with _CharT = char; _Traits = std::char_traits<char>; std::basic_ostream<_CharT, _Traits>::__ostream_type = std::basic_ostream<char>; std::basic_ostream<_CharT, _Traits>::__ios_type = std::basic_ios<char>]’
           operator<<(__ios_type& (*__pf)(__ios_type&))
           ^~~~~~~~
    /usr/include/c++/8/ostream:117:7: note:   no known conversion for argument 1 from ‘fr::Socket::Status’ to ‘std::basic_ostream<char>::__ios_type& (*)(std::basic_ostream<char>::__ios_type&)’ {aka ‘std::basic_ios<char>& (*)(std::basic_ios<char>&)’}
    /usr/include/c++/8/ostream:127:7: note: candidate: ‘std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(std::ios_base& (*)(std::ios_base&)) [with _CharT = char; _Traits = std::char_traits<char>; std::basic_ostream<_CharT, _Traits>::__ostream_type = std::basic_ostream<char>]’
           operator<<(ios_base& (*__pf) (ios_base&))
           ^~~~~~~~
    /usr/include/c++/8/ostream:127:7: note:   no known conversion for argument 1 from ‘fr::Socket::Status’ to ‘std::ios_base& (*)(std::ios_base&)’
    /usr/include/c++/8/ostream:166:7: note: candidate: ‘std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(long int) [with _CharT = char; _Traits = std::char_traits<char>; std::basic_ostream<_CharT, _Traits>::__ostream_type = std::basic_ostream<char>]’
           operator<<(long __n)
           ^~~~~~~~
    /usr/include/c++/8/ostream:166:7: note:   no known conversion for argument 1 from ‘fr::Socket::Status’ to ‘long int’
    /usr/include/c++/8/ostream:170:7: note: candidate: ‘std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(long unsigned int) [with _CharT = char; _Traits = std::char_traits<char>; std::basic_ostream<_CharT, _Traits>::__ostream_type = std::basic_ostream<char>]’
           operator<<(unsigned long __n)
           ^~~~~~~~
    /usr/include/c++/8/ostream:170:7: note:   no known conversion for argument 1 from ‘fr::Socket::Status’ to ‘long unsigned int’
    /usr/include/c++/8/ostream:174:7: note: candidate: ‘std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(bool) [with _CharT = char; _Traits = std::char_traits<char>; std::basic_ostream<_CharT, _Traits>::__ostream_type = std::basic_ostream<char>]’
           operator<<(bool __n)
           ^~~~~~~~
    /usr/include/c++/8/ostream:174:7: note:   no known conversion for argument 1 from ‘fr::Socket::Status’ to ‘bool’
    In file included from /usr/include/c++/8/ostream:693,
                     from /usr/include/c++/8/iostream:39,
                     from /home/panda/frnetlib-master/examples/simple_http_server_and_client/SimpleHttpServer.cpp:8:
    /usr/include/c++/8/bits/ostream.tcc:91:5: note: candidate: ‘std::basic_ostream<_CharT, _Traits>& std::basic_ostream<_CharT, _Traits>::operator<<(short int) [with _CharT = char; _Traits = std::char_traits<char>]’
         basic_ostream<_CharT, _Traits>::
         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    /usr/include/c++/8/bits/ostream.tcc:91:5: note:   no known conversion for argument 1 from ‘fr::Socket::Status’ to ‘short int’
    In file included from /usr/include/c++/8/iostream:39,
                     from /home/panda/frnetlib-master/examples/simple_http_server_and_client/SimpleHttpServer.cpp:8:
    /usr/include/c++/8/ostream:181:7: note: candidate: ‘std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(short unsigned int) [with _CharT = char; _Traits = std::char_traits<char>; std::basic_ostream<_CharT, _Traits>::__ostream_type = std::basic_ostream<char>]’
           operator<<(unsigned short __n)
           ^~~~~~~~
    /usr/include/c++/8/ostream:181:7: note:   no known conversion for argument 1 from ‘fr::Socket::Status’ to ‘short unsigned int’
    In file included from /usr/include/c++/8/ostream:693,
                     from /usr/include/c++/8/iostream:39,
                     from /home/panda/frnetlib-master/examples/simple_http_server_and_client/SimpleHttpServer.cpp:8:
    /usr/include/c++/8/bits/ostream.tcc:105:5: note: candidate: ‘std::basic_ostream<_CharT, _Traits>& std::basic_ostream<_CharT, _Traits>::operator<<(int) [with _CharT = char; _Traits = std::char_traits<char>]’
         basic_ostream<_CharT, _Traits>::
         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    /usr/include/c++/8/bits/ostream.tcc:105:5: note:   no known conversion for argument 1 from ‘fr::Socket::Status’ to ‘int’
    In file included from /usr/include/c++/8/iostream:39,
                     from /home/panda/frnetlib-master/examples/simple_http_server_and_client/SimpleHttpServer.cpp:8:
    /usr/include/c++/8/ostream:192:7: note: candidate: ‘std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(unsigned int) [with _CharT = char; _Traits = std::char_traits<char>; std::basic_ostream<_CharT, _Traits>::__ostream_type = std::basic_ostream<char>]’
           operator<<(unsigned int __n)
           ^~~~~~~~
    /usr/include/c++/8/ostream:192:7: note:   no known conversion for argument 1 from ‘fr::Socket::Status’ to ‘unsigned int’
    /usr/include/c++/8/ostream:201:7: note: candidate: ‘std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(long long int) [with _CharT = char; _Traits = std::char_traits<char>; std::basic_ostream<_CharT, _Traits>::__ostream_type = std::basic_ostream<char>]’
           operator<<(long long __n)
           ^~~~~~~~
    /usr/include/c++/8/ostream:201:7: note:   no known conversion for argument 1 from ‘fr::Socket::Status’ to ‘long long int’
    /usr/include/c++/8/ostream:205:7: note: candidate: ‘std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(long long unsigned int) [with _CharT = char; _Traits = std::char_traits<char>; std::basic_ostream<_CharT, _Traits>::__ostream_type = std::basic_ostream<char>]’
           operator<<(unsigned long long __n)
           ^~~~~~~~
    /usr/include/c++/8/ostream:205:7: note:   no known conversion for argument 1 from ‘fr::Socket::Status’ to ‘long long unsigned int’
    /usr/include/c++/8/ostream:220:7: note: candidate: ‘std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(double) [with _CharT = char; _Traits = std::char_traits<char>; std::basic_ostream<_CharT, _Traits>::__ostream_type = std::basic_ostream<char>]’
           operator<<(double __f)
           ^~~~~~~~
    /usr/include/c++/8/ostream:220:7: note:   no known conversion for argument 1 from ‘fr::Socket::Status’ to ‘double’
    /usr/include/c++/8/ostream:224:7: note: candidate: ‘std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(float) [with _CharT = char; _Traits = std::char_traits<char>; std::basic_ostream<_CharT, _Traits>::__ostream_type = std::basic_ostream<char>]’
           operator<<(float __f)
           ^~~~~~~~
    /usr/include/c++/8/ostream:224:7: note:   no known conversion for argument 1 from ‘fr::Socket::Status’ to ‘float’
    /usr/include/c++/8/ostream:232:7: note: candidate: ‘std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(long double) [with _CharT = char; _Traits = std::char_traits<char>; std::basic_ostream<_CharT, _Traits>::__ostream_type = std::basic_ostream<char>]’
           operator<<(long double __f)
           ^~~~~~~~
    /usr/include/c++/8/ostream:232:7: note:   no known conversion for argument 1 from ‘fr::Socket::Status’ to ‘long double’
    /usr/include/c++/8/ostream:245:7: note: candidate: ‘std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(const void*) [with _CharT = char; _Traits = std::char_traits<char>; std::basic_ostream<_CharT, _Traits>::__ostream_type = std::basic_ostream<char>]’
           operator<<(const void* __p)
           ^~~~~~~~
    /usr/include/c++/8/ostream:245:7: note:   no known conversion for argument 1 from ‘fr::Socket::Status’ to ‘const void*’
    In file included from /usr/include/c++/8/ostream:693,
                     from /usr/include/c++/8/iostream:39,
                     from /home/panda/frnetlib-master/examples/simple_http_server_and_client/SimpleHttpServer.cpp:8:
    /usr/include/c++/8/bits/ostream.tcc:119:5: note: candidate: ‘std::basic_ostream<_CharT, _Traits>& std::basic_ostream<_CharT, _Traits>::operator<<(std::basic_ostream<_CharT, _Traits>::__streambuf_type*) [with _CharT = char; _Traits = std::char_traits<char>; std::basic_ostream<_CharT, _Traits>::__streambuf_type = std::basic_streambuf<char>]’
         basic_ostream<_CharT, _Traits>::
         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    /usr/include/c++/8/bits/ostream.tcc:119:5: note:   no known conversion for argument 1 from ‘fr::Socket::Status’ to ‘std::basic_ostream<char>::__streambuf_type*’ {aka ‘std::basic_streambuf<char>*’}
    In file included from /usr/include/c++/8/string:52,
                     from /home/panda/frnetlib-master/include/frnetlib/HttpRequest.h:7,
                     from /home/panda/frnetlib-master/examples/simple_http_server_and_client/SimpleHttpServer.cpp:5:
    /usr/include/c++/8/bits/basic_string.h:6323:5: note: candidate: ‘template<class _CharT, class _Traits, class _Alloc> std::basic_ostream<_CharT, _Traits>& std::operator<<(std::basic_ostream<_CharT, _Traits>&, const std::__cxx11::basic_string<_CharT, _Traits, _Alloc>&)’
         operator<<(basic_ostream<_CharT, _Traits>& __os,
         ^~~~~~~~
    /usr/include/c++/8/bits/basic_string.h:6323:5: note:   template argument deduction/substitution failed:
    /home/panda/frnetlib-master/examples/simple_http_server_and_client/SimpleHttpServer.cpp:28:65: note:   mismatched types ‘const std::__cxx11::basic_string<_CharT, _Traits, _Alloc>’ and ‘fr::Socket::Status’
                 std::cerr << "Failed to accept new connection: " << err << std::endl;
                                                                     ^~~
    In file included from /usr/include/c++/8/memory:81,
                     from /home/panda/frnetlib-master/include/frnetlib/TcpSocket.h:8,
                     from /home/panda/frnetlib-master/include/frnetlib/HttpRequest.h:10,
                     from /home/panda/frnetlib-master/examples/simple_http_server_and_client/SimpleHttpServer.cpp:5:
    /usr/include/c++/8/bits/shared_ptr.h:66:5: note: candidate: ‘template<class _Ch, class _Tr, class _Tp, __gnu_cxx::_Lock_policy _Lp> std::basic_ostream<_CharT, _Traits>& std::operator<<(std::basic_ostream<_CharT, _Traits>&, const std::__shared_ptr<_Tp, _Lp>&)’
         operator<<(std::basic_ostream<_Ch, _Tr>& __os,
         ^~~~~~~~
    /usr/include/c++/8/bits/shared_ptr.h:66:5: note:   template argument deduction/substitution failed:
    /home/panda/frnetlib-master/examples/simple_http_server_and_client/SimpleHttpServer.cpp:28:65: note:   mismatched types ‘const std::__shared_ptr<_Tp, _Lp>’ and ‘fr::Socket::Status’
                 std::cerr << "Failed to accept new connection: " << err << std::endl;
                                                                     ^~~
    In file included from /usr/include/c++/8/mutex:42,
                     from /home/panda/frnetlib-master/include/frnetlib/TcpSocket.h:9,
                     from /home/panda/frnetlib-master/include/frnetlib/HttpRequest.h:10,
                     from /home/panda/frnetlib-master/examples/simple_http_server_and_client/SimpleHttpServer.cpp:5:
    /usr/include/c++/8/system_error:217:5: note: candidate: ‘template<class _CharT, class _Traits> std::basic_ostream<_CharT, _Traits>& std::operator<<(std::basic_ostream<_CharT, _Traits>&, const std::error_code&)’
         operator<<(basic_ostream<_CharT, _Traits>& __os, const error_code& __e)
         ^~~~~~~~
    /usr/include/c++/8/system_error:217:5: note:   template argument deduction/substitution failed:
    /home/panda/frnetlib-master/examples/simple_http_server_and_client/SimpleHttpServer.cpp:28:65: note:   cannot convert ‘err’ (type ‘fr::Socket::Status’) to type ‘const std::error_code&’
                 std::cerr << "Failed to accept new connection: " << err << std::endl;
                                                                     ^~~
    In file included from /usr/include/c++/8/iostream:39,
                     from /home/panda/frnetlib-master/examples/simple_http_server_and_client/SimpleHttpServer.cpp:8:
    /usr/include/c++/8/ostream:497:5: note: candidate: ‘template<class _CharT, class _Traits> std::basic_ostream<_CharT, _Traits>& std::operator<<(std::basic_ostream<_CharT, _Traits>&, _CharT)’
         operator<<(basic_ostream<_CharT, _Traits>& __out, _CharT __c)
         ^~~~~~~~
    /usr/include/c++/8/ostream:497:5: note:   template argument deduction/substitution failed:
    /home/panda/frnetlib-master/examples/simple_http_server_and_client/SimpleHttpServer.cpp:28:65: note:   deduced conflicting types for parameter ‘_CharT’ (‘char’ and ‘fr::Socket::Status’)
                 std::cerr << "Failed to accept new connection: " << err << std::endl;
                                                                     ^~~
    In file included from /usr/include/c++/8/iostream:39,
                     from /home/panda/frnetlib-master/examples/simple_http_server_and_client/SimpleHttpServer.cpp:8:
    /usr/include/c++/8/ostream:502:5: note: candidate: ‘template<class _CharT, class _Traits> std::basic_ostream<_CharT, _Traits>& std::operator<<(std::basic_ostream<_CharT, _Traits>&, char)’
         operator<<(basic_ostream<_CharT, _Traits>& __out, char __c)
         ^~~~~~~~
    /usr/include/c++/8/ostream:502:5: note:   template argument deduction/substitution failed:
    /home/panda/frnetlib-master/examples/simple_http_server_and_client/SimpleHttpServer.cpp:28:65: note:   cannot convert ‘err’ (type ‘fr::Socket::Status’) to type ‘char’
                 std::cerr << "Failed to accept new connection: " << err << std::endl;
                                                                     ^~~
    In file included from /usr/include/c++/8/iostream:39,
                     from /home/panda/frnetlib-master/examples/simple_http_server_and_client/SimpleHttpServer.cpp:8:
    /usr/include/c++/8/ostream:508:5: note: candidate: ‘template<class _Traits> std::basic_ostream<char, _Traits>& std::operator<<(std::basic_ostream<char, _Traits>&, char)’
         operator<<(basic_ostream<char, _Traits>& __out, char __c)
         ^~~~~~~~
    /usr/include/c++/8/ostream:508:5: note:   template argument deduction/substitution failed:
    /home/panda/frnetlib-master/examples/simple_http_server_and_client/SimpleHttpServer.cpp:28:65: note:   cannot convert ‘err’ (type ‘fr::Socket::Status’) to type ‘char’
                 std::cerr << "Failed to accept new connection: " << err << std::endl;
                                                                     ^~~
    In file included from /usr/include/c++/8/iostream:39,
                     from /home/panda/frnetlib-master/examples/simple_http_server_and_client/SimpleHttpServer.cpp:8:
    /usr/include/c++/8/ostream:514:5: note: candidate: ‘template<class _Traits> std::basic_ostream<char, _Traits>& std::operator<<(std::basic_ostream<char, _Traits>&, signed char)’
         operator<<(basic_ostream<char, _Traits>& __out, signed char __c)
         ^~~~~~~~
    /usr/include/c++/8/ostream:514:5: note:   template argument deduction/substitution failed:
    /home/panda/frnetlib-master/examples/simple_http_server_and_client/SimpleHttpServer.cpp:28:65: note:   cannot convert ‘err’ (type ‘fr::Socket::Status’) to type ‘signed char’
                 std::cerr << "Failed to accept new connection: " << err << std::endl;
                                                                     ^~~
    In file included from /usr/include/c++/8/iostream:39,
                     from /home/panda/frnetlib-master/examples/simple_http_server_and_client/SimpleHttpServer.cpp:8:
    /usr/include/c++/8/ostream:519:5: note: candidate: ‘template<class _Traits> std::basic_ostream<char, _Traits>& std::operator<<(std::basic_ostream<char, _Traits>&, unsigned char)’
         operator<<(basic_ostream<char, _Traits>& __out, unsigned char __c)
         ^~~~~~~~
    /usr/include/c++/8/ostream:519:5: note:   template argument deduction/substitution failed:
    /home/panda/frnetlib-master/examples/simple_http_server_and_client/SimpleHttpServer.cpp:28:65: note:   cannot convert ‘err’ (type ‘fr::Socket::Status’) to type ‘unsigned char’
                 std::cerr << "Failed to accept new connection: " << err << std::endl;
                                                                     ^~~
    In file included from /usr/include/c++/8/iostream:39,
                     from /home/panda/frnetlib-master/examples/simple_http_server_and_client/SimpleHttpServer.cpp:8:
    /usr/include/c++/8/ostream:539:5: note: candidate: ‘template<class _CharT, class _Traits> std::basic_ostream<_CharT, _Traits>& std::operator<<(std::basic_ostream<_CharT, _Traits>&, const _CharT*)’
         operator<<(basic_ostream<_CharT, _Traits>& __out, const _CharT* __s)
         ^~~~~~~~
    /usr/include/c++/8/ostream:539:5: note:   template argument deduction/substitution failed:
    /home/panda/frnetlib-master/examples/simple_http_server_and_client/SimpleHttpServer.cpp:28:65: note:   mismatched types ‘const _CharT*’ and ‘fr::Socket::Status’
                 std::cerr << "Failed to accept new connection: " << err << std::endl;
                                                                     ^~~
    In file included from /usr/include/c++/8/ostream:693,
                     from /usr/include/c++/8/iostream:39,
                     from /home/panda/frnetlib-master/examples/simple_http_server_and_client/SimpleHttpServer.cpp:8:
    /usr/include/c++/8/bits/ostream.tcc:321:5: note: candidate: ‘template<class _CharT, class _Traits> std::basic_ostream<_CharT, _Traits>& std::operator<<(std::basic_ostream<_CharT, _Traits>&, const char*)’
         operator<<(basic_ostream<_CharT, _Traits>& __out, const char* __s)
         ^~~~~~~~
    /usr/include/c++/8/bits/ostream.tcc:321:5: note:   template argument deduction/substitution failed:
    /home/panda/frnetlib-master/examples/simple_http_server_and_client/SimpleHttpServer.cpp:28:65: note:   cannot convert ‘err’ (type ‘fr::Socket::Status’) to type ‘const char*’
                 std::cerr << "Failed to accept new connection: " << err << std::endl;
                                                                     ^~~
    In file included from /usr/include/c++/8/iostream:39,
                     from /home/panda/frnetlib-master/examples/simple_http_server_and_client/SimpleHttpServer.cpp:8:
    /usr/include/c++/8/ostream:556:5: note: candidate: ‘template<class _Traits> std::basic_ostream<char, _Traits>& std::operator<<(std::basic_ostream<char, _Traits>&, const char*)’
         operator<<(basic_ostream<char, _Traits>& __out, const char* __s)
         ^~~~~~~~
    /usr/include/c++/8/ostream:556:5: note:   template argument deduction/substitution failed:
    /home/panda/frnetlib-master/examples/simple_http_server_and_client/SimpleHttpServer.cpp:28:65: note:   cannot convert ‘err’ (type ‘fr::Socket::Status’) to type ‘const char*’
                 std::cerr << "Failed to accept new connection: " << err << std::endl;
                                                                     ^~~
    In file included from /usr/include/c++/8/iostream:39,
                     from /home/panda/frnetlib-master/examples/simple_http_server_and_client/SimpleHttpServer.cpp:8:
    /usr/include/c++/8/ostream:569:5: note: candidate: ‘template<class _Traits> std::basic_ostream<char, _Traits>& std::operator<<(std::basic_ostream<char, _Traits>&, const signed char*)’
         operator<<(basic_ostream<char, _Traits>& __out, const signed char* __s)
         ^~~~~~~~
    /usr/include/c++/8/ostream:569:5: note:   template argument deduction/substitution failed:
    /home/panda/frnetlib-master/examples/simple_http_server_and_client/SimpleHttpServer.cpp:28:65: note:   cannot convert ‘err’ (type ‘fr::Socket::Status’) to type ‘const signed char*’
                 std::cerr << "Failed to accept new connection: " << err << std::endl;
                                                                     ^~~
    In file included from /usr/include/c++/8/iostream:39,
                     from /home/panda/frnetlib-master/examples/simple_http_server_and_client/SimpleHttpServer.cpp:8:
    /usr/include/c++/8/ostream:574:5: note: candidate: ‘template<class _Traits> std::basic_ostream<char, _Traits>& std::operator<<(std::basic_ostream<char, _Traits>&, const unsigned char*)’
         operator<<(basic_ostream<char, _Traits>& __out, const unsigned char* __s)
         ^~~~~~~~
    /usr/include/c++/8/ostream:574:5: note:   template argument deduction/substitution failed:
    /home/panda/frnetlib-master/examples/simple_http_server_and_client/SimpleHttpServer.cpp:28:65: note:   cannot convert ‘err’ (type ‘fr::Socket::Status’) to type ‘const unsigned char*’
                 std::cerr << "Failed to accept new connection: " << err << std::endl;
                                                                     ^~~
    In file included from /usr/include/c++/8/iostream:39,
                     from /home/panda/frnetlib-master/examples/simple_http_server_and_client/SimpleHttpServer.cpp:8:
    /usr/include/c++/8/ostream:682:5: note: candidate: ‘template<class _Ostream, class _Tp> typename std::enable_if<std::__and_<std::__not_<std::is_lvalue_reference<_Tp> >, std::__is_convertible_to_basic_ostream<_Ostream>, std::__is_insertable<typename std::__is_convertible_to_basic_ostream<_Tp>::__ostream_type, const _Tp&, void> >::value, typename std::__is_convertible_to_basic_ostream<_Tp>::__ostream_type>::type std::operator<<(_Ostream&&, const _Tp&)’
         operator<<(_Ostream&& __os, const _Tp& __x)
         ^~~~~~~~
    /usr/include/c++/8/ostream:682:5: note:   template argument deduction/substitution failed:
    /usr/include/c++/8/ostream: In substitution of ‘template<class _Ostream, class _Tp> typename std::enable_if<std::__and_<std::__not_<std::is_lvalue_reference<_Tp> >, std::__is_convertible_to_basic_ostream<_Ostream>, std::__is_insertable<typename std::__is_convertible_to_basic_ostream<_Tp>::__ostream_type, const _Tp&, void> >::value, typename std::__is_convertible_to_basic_ostream<_Tp>::__ostream_type>::type std::operator<<(_Ostream&&, const _Tp&) [with _Ostream = std::basic_ostream<char>&; _Tp = fr::Socket::Status]’:
    /home/panda/frnetlib-master/examples/simple_http_server_and_client/SimpleHttpServer.cpp:28:65:   required from here
    /usr/include/c++/8/ostream:682:5: error: no type named ‘type’ in ‘struct std::enable_if<false, std::basic_ostream<char>&>’
    /home/panda/frnetlib-master/examples/simple_http_server_and_client/SimpleHttpServer.cpp:34:59: error: ‘Success’ is not a member of ‘fr::Socket’
             if((err = client.receive(request)) != fr::Socket::Success)
                                                               ^~~~~~~
    /home/panda/frnetlib-master/examples/simple_http_server_and_client/SimpleHttpServer.cpp:36:68: error: no match for ‘operator<<’ (operand types are ‘std::basic_ostream<char>’ and ‘fr::Socket::Status’)
                 std::cerr << "Failed to receive request from client: " << err << std::endl;
                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~
    In file included from /usr/include/c++/8/iostream:39,
                     from /home/panda/frnetlib-master/examples/simple_http_server_and_client/SimpleHttpServer.cpp:8:
    /usr/include/c++/8/ostream:108:7: note: candidate: ‘std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(std::basic_ostream<_CharT, _Traits>::__ostream_type& (*)(std::basic_ostream<_CharT, _Traits>::__ostream_type&)) [with _CharT = char; _Traits = std::char_traits<char>; std::basic_ostream<_CharT, _Traits>::__ostream_type = std::basic_ostream<char>]’
           operator<<(__ostream_type& (*__pf)(__ostream_type&))
           ^~~~~~~~
    /usr/include/c++/8/ostream:108:7: note:   no known conversion for argument 1 from ‘fr::Socket::Status’ to ‘std::basic_ostream<char>::__ostream_type& (*)(std::basic_ostream<char>::__ostream_type&)’ {aka ‘std::basic_ostream<char>& (*)(std::basic_ostream<char>&)’}
    /usr/include/c++/8/ostream:117:7: note: candidate: ‘std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(std::basic_ostream<_CharT, _Traits>::__ios_type& (*)(std::basic_ostream<_CharT, _Traits>::__ios_type&)) [with _CharT = char; _Traits = std::char_traits<char>; std::basic_ostream<_CharT, _Traits>::__ostream_type = std::basic_ostream<char>; std::basic_ostream<_CharT, _Traits>::__ios_type = std::basic_ios<char>]’
           operator<<(__ios_type& (*__pf)(__ios_type&))
           ^~~~~~~~
    /usr/include/c++/8/ostream:117:7: note:   no known conversion for argument 1 from ‘fr::Socket::Status’ to ‘std::basic_ostream<char>::__ios_type& (*)(std::basic_ostream<char>::__ios_type&)’ {aka ‘std::basic_ios<char>& (*)(std::basic_ios<char>&)’}
    /usr/include/c++/8/ostream:127:7: note: candidate: ‘std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(std::ios_base& (*)(std::ios_base&)) [with _CharT = char; _Traits = std::char_traits<char>; std::basic_ostream<_CharT, _Traits>::__ostream_type = std::basic_ostream<char>]’
           operator<<(ios_base& (*__pf) (ios_base&))
           ^~~~~~~~
    /usr/include/c++/8/ostream:127:7: note:   no known conversion for argument 1 from ‘fr::Socket::Status’ to ‘std::ios_base& (*)(std::ios_base&)’
    /usr/include/c++/8/ostream:166:7: note: candidate: ‘std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(long int) [with _CharT = char; _Traits = std::char_traits<char>; std::basic_ostream<_CharT, _Traits>::__ostream_type = std::basic_ostream<char>]’
           operator<<(long __n)
           ^~~~~~~~
    /usr/include/c++/8/ostream:166:7: note:   no known conversion for argument 1 from ‘fr::Socket::Status’ to ‘long int’
    /usr/include/c++/8/ostream:170:7: note: candidate: ‘std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(long unsigned int) [with _CharT = char; _Traits = std::char_traits<char>; std::basic_ostream<_CharT, _Traits>::__ostream_type = std::basic_ostream<char>]’
           operator<<(unsigned long __n)
           ^~~~~~~~
    /usr/include/c++/8/ostream:170:7: note:   no known conversion for argument 1 from ‘fr::Socket::Status’ to ‘long unsigned int’
    /usr/include/c++/8/ostream:174:7: note: candidate: ‘std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(bool) [with _CharT = char; _Traits = std::char_traits<char>; std::basic_ostream<_CharT, _Traits>::__ostream_type = std::basic_ostream<char>]’
           operator<<(bool __n)
           ^~~~~~~~
    /usr/include/c++/8/ostream:174:7: note:   no known conversion for argument 1 from ‘fr::Socket::Status’ to ‘bool’
    In file included from /usr/include/c++/8/ostream:693,
                     from /usr/include/c++/8/iostream:39,
                     from /home/panda/frnetlib-master/examples/simple_http_server_and_client/SimpleHttpServer.cpp:8:
    /usr/include/c++/8/bits/ostream.tcc:91:5: note: candidate: ‘std::basic_ostream<_CharT, _Traits>& std::basic_ostream<_CharT, _Traits>::operator<<(short int) [with _CharT = char; _Traits = std::char_traits<char>]’
         basic_ostream<_CharT, _Traits>::
         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    /usr/include/c++/8/bits/ostream.tcc:91:5: note:   no known conversion for argument 1 from ‘fr::Socket::Status’ to ‘short int’
    In file included from /usr/include/c++/8/iostream:39,
                     from /home/panda/frnetlib-master/examples/simple_http_server_and_client/SimpleHttpServer.cpp:8:
    /usr/include/c++/8/ostream:181:7: note: candidate: ‘std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(short unsigned int) [with _CharT = char; _Traits = std::char_traits<char>; std::basic_ostream<_CharT, _Traits>::__ostream_type = std::basic_ostream<char>]’
           operator<<(unsigned short __n)
           ^~~~~~~~
    /usr/include/c++/8/ostream:181:7: note:   no known conversion for argument 1 from ‘fr::Socket::Status’ to ‘short unsigned int’
    In file included from /usr/include/c++/8/ostream:693,
                     from /usr/include/c++/8/iostream:39,
                     from /home/panda/frnetlib-master/examples/simple_http_server_and_client/SimpleHttpServer.cpp:8:
    /usr/include/c++/8/bits/ostream.tcc:105:5: note: candidate: ‘std::basic_ostream<_CharT, _Traits>& std::basic_ostream<_CharT, _Traits>::operator<<(int) [with _CharT = char; _Traits = std::char_traits<char>]’
         basic_ostream<_CharT, _Traits>::
         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    /usr/include/c++/8/bits/ostream.tcc:105:5: note:   no known conversion for argument 1 from ‘fr::Socket::Status’ to ‘int’
    In file included from /usr/include/c++/8/iostream:39,
                     from /home/panda/frnetlib-master/examples/simple_http_server_and_client/SimpleHttpServer.cpp:8:
    /usr/include/c++/8/ostream:192:7: note: candidate: ‘std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(unsigned int) [with _CharT = char; _Traits = std::char_traits<char>; std::basic_ostream<_CharT, _Traits>::__ostream_type = std::basic_ostream<char>]’
           operator<<(unsigned int __n)
           ^~~~~~~~
    /usr/include/c++/8/ostream:192:7: note:   no known conversion for argument 1 from ‘fr::Socket::Status’ to ‘unsigned int’
    /usr/include/c++/8/ostream:201:7: note: candidate: ‘std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(long long int) [with _CharT = char; _Traits = std::char_traits<char>; std::basic_ostream<_CharT, _Traits>::__ostream_type = std::basic_ostream<char>]’
           operator<<(long long __n)
           ^~~~~~~~
    /usr/include/c++/8/ostream:201:7: note:   no known conversion for argument 1 from ‘fr::Socket::Status’ to ‘long long int’
    /usr/include/c++/8/ostream:205:7: note: candidate: ‘std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(long long unsigned int) [with _CharT = char; _Traits = std::char_traits<char>; std::basic_ostream<_CharT, _Traits>::__ostream_type = std::basic_ostream<char>]’
           operator<<(unsigned long long __n)
           ^~~~~~~~
    /usr/include/c++/8/ostream:205:7: note:   no known conversion for argument 1 from ‘fr::Socket::Status’ to ‘long long unsigned int’
    /usr/include/c++/8/ostream:220:7: note: candidate: ‘std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(double) [with _CharT = char; _Traits = std::char_traits<char>; std::basic_ostream<_CharT, _Traits>::__ostream_type = std::basic_ostream<char>]’
           operator<<(double __f)
           ^~~~~~~~
    /usr/include/c++/8/ostream:220:7: note:   no known conversion for argument 1 from ‘fr::Socket::Status’ to ‘double’
    /usr/include/c++/8/ostream:224:7: note: candidate: ‘std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(float) [with _CharT = char; _Traits = std::char_traits<char>; std::basic_ostream<_CharT, _Traits>::__ostream_type = std::basic_ostream<char>]’
           operator<<(float __f)
           ^~~~~~~~
    /usr/include/c++/8/ostream:224:7: note:   no known conversion for argument 1 from ‘fr::Socket::Status’ to ‘float’
    /usr/include/c++/8/ostream:232:7: note: candidate: ‘std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(long double) [with _CharT = char; _Traits = std::char_traits<char>; std::basic_ostream<_CharT, _Traits>::__ostream_type = std::basic_ostream<char>]’
           operator<<(long double __f)
           ^~~~~~~~
    /usr/include/c++/8/ostream:232:7: note:   no known conversion for argument 1 from ‘fr::Socket::Status’ to ‘long double’
    /usr/include/c++/8/ostream:245:7: note: candidate: ‘std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(const void*) [with _CharT = char; _Traits = std::char_traits<char>; std::basic_ostream<_CharT, _Traits>::__ostream_type = std::basic_ostream<char>]’
           operator<<(const void* __p)
           ^~~~~~~~
    /usr/include/c++/8/ostream:245:7: note:   no known conversion for argument 1 from ‘fr::Socket::Status’ to ‘const void*’
    In file included from /usr/include/c++/8/ostream:693,
                     from /usr/include/c++/8/iostream:39,
                     from /home/panda/frnetlib-master/examples/simple_http_server_and_client/SimpleHttpServer.cpp:8:
    /usr/include/c++/8/bits/ostream.tcc:119:5: note: candidate: ‘std::basic_ostream<_CharT, _Traits>& std::basic_ostream<_CharT, _Traits>::operator<<(std::basic_ostream<_CharT, _Traits>::__streambuf_type*) [with _CharT = char; _Traits = std::char_traits<char>; std::basic_ostream<_CharT, _Traits>::__streambuf_type = std::basic_streambuf<char>]’
         basic_ostream<_CharT, _Traits>::
         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    /usr/include/c++/8/bits/ostream.tcc:119:5: note:   no known conversion for argument 1 from ‘fr::Socket::Status’ to ‘std::basic_ostream<char>::__streambuf_type*’ {aka ‘std::basic_streambuf<char>*’}
    In file included from /usr/include/c++/8/string:52,
                     from /home/panda/frnetlib-master/include/frnetlib/HttpRequest.h:7,
                     from /home/panda/frnetlib-master/examples/simple_http_server_and_client/SimpleHttpServer.cpp:5:
    /usr/include/c++/8/bits/basic_string.h:6323:5: note: candidate: ‘template<class _CharT, class _Traits, class _Alloc> std::basic_ostream<_CharT, _Traits>& std::operator<<(std::basic_ostream<_CharT, _Traits>&, const std::__cxx11::basic_string<_CharT, _Traits, _Alloc>&)’
         operator<<(basic_ostream<_CharT, _Traits>& __os,
         ^~~~~~~~
    /usr/include/c++/8/bits/basic_string.h:6323:5: note:   template argument deduction/substitution failed:
    /home/panda/frnetlib-master/examples/simple_http_server_and_client/SimpleHttpServer.cpp:36:71: note:   mismatched types ‘const std::__cxx11::basic_string<_CharT, _Traits, _Alloc>’ and ‘fr::Socket::Status’
               std::cerr << "Failed to receive request from client: " << err << std::endl;
                                                                         ^~~
    
    In file included from /usr/include/c++/8/memory:81,
                     from /home/panda/frnetlib-master/include/frnetlib/TcpSocket.h:8,
                     from /home/panda/frnetlib-master/include/frnetlib/HttpRequest.h:10,
                     from /home/panda/frnetlib-master/examples/simple_http_server_and_client/SimpleHttpServer.cpp:5:
    /usr/include/c++/8/bits/shared_ptr.h:66:5: note: candidate: ‘template<class _Ch, class _Tr, class _Tp, __gnu_cxx::_Lock_policy _Lp> std::basic_ostream<_CharT, _Traits>& std::operator<<(std::basic_ostream<_CharT, _Traits>&, const std::__shared_ptr<_Tp, _Lp>&)’
         operator<<(std::basic_ostream<_Ch, _Tr>& __os,
         ^~~~~~~~
    /usr/include/c++/8/bits/shared_ptr.h:66:5: note:   template argument deduction/substitution failed:
    /home/panda/frnetlib-master/examples/simple_http_server_and_client/SimpleHttpServer.cpp:36:71: note:   mismatched types ‘const std::__shared_ptr<_Tp, _Lp>’ and ‘fr::Socket::Status’
               std::cerr << "Failed to receive request from client: " << err << std::endl;
                                                                         ^~~
    
    In file included from /usr/include/c++/8/mutex:42,
                     from /home/panda/frnetlib-master/include/frnetlib/TcpSocket.h:9,
                     from /home/panda/frnetlib-master/include/frnetlib/HttpRequest.h:10,
                     from /home/panda/frnetlib-master/examples/simple_http_server_and_client/SimpleHttpServer.cpp:5:
    /usr/include/c++/8/system_error:217:5: note: candidate: ‘template<class _CharT, class _Traits> std::basic_ostream<_CharT, _Traits>& std::operator<<(std::basic_ostream<_CharT, _Traits>&, const std::error_code&)’
         operator<<(basic_ostream<_CharT, _Traits>& __os, const error_code& __e)
         ^~~~~~~~
    /usr/include/c++/8/system_error:217:5: note:   template argument deduction/substitution failed:
    /home/panda/frnetlib-master/examples/simple_http_server_and_client/SimpleHttpServer.cpp:36:71: note:   cannot convert ‘err’ (type ‘fr::Socket::Status’) to type ‘const std::error_code&’
               std::cerr << "Failed to receive request from client: " << err << std::endl;
                                                                         ^~~
    
    In file included from /usr/include/c++/8/iostream:39,
                     from /home/panda/frnetlib-master/examples/simple_http_server_and_client/SimpleHttpServer.cpp:8:
    /usr/include/c++/8/ostream:497:5: note: candidate: ‘template<class _CharT, class _Traits> std::basic_ostream<_CharT, _Traits>& std::operator<<(std::basic_ostream<_CharT, _Traits>&, _CharT)’
         operator<<(basic_ostream<_CharT, _Traits>& __out, _CharT __c)
         ^~~~~~~~
    /usr/include/c++/8/ostream:497:5: note:   template argument deduction/substitution failed:
    /home/panda/frnetlib-master/examples/simple_http_server_and_client/SimpleHttpServer.cpp:36:71: note:   deduced conflicting types for parameter ‘_CharT’ (‘char’ and ‘fr::Socket::Status’)
               std::cerr << "Failed to receive request from client: " << err << std::endl;
                                                                         ^~~
    
    In file included from /usr/include/c++/8/iostream:39,
                     from /home/panda/frnetlib-master/examples/simple_http_server_and_client/SimpleHttpServer.cpp:8:
    /usr/include/c++/8/ostream:502:5: note: candidate: ‘template<class _CharT, class _Traits> std::basic_ostream<_CharT, _Traits>& std::operator<<(std::basic_ostream<_CharT, _Traits>&, char)’
         operator<<(basic_ostream<_CharT, _Traits>& __out, char __c)
         ^~~~~~~~
    /usr/include/c++/8/ostream:502:5: note:   template argument deduction/substitution failed:
    /home/panda/frnetlib-master/examples/simple_http_server_and_client/SimpleHttpServer.cpp:36:71: note:   cannot convert ‘err’ (type ‘fr::Socket::Status’) to type ‘char’
               std::cerr << "Failed to receive request from client: " << err << std::endl;
                                                                         ^~~
    
    In file included from /usr/include/c++/8/iostream:39,
                     from /home/panda/frnetlib-master/examples/simple_http_server_and_client/SimpleHttpServer.cpp:8:
    /usr/include/c++/8/ostream:508:5: note: candidate: ‘template<class _Traits> std::basic_ostream<char, _Traits>& std::operator<<(std::basic_ostream<char, _Traits>&, char)’
         operator<<(basic_ostream<char, _Traits>& __out, char __c)
         ^~~~~~~~
    /usr/include/c++/8/ostream:508:5: note:   template argument deduction/substitution failed:
    /home/panda/frnetlib-master/examples/simple_http_server_and_client/SimpleHttpServer.cpp:36:71: note:   cannot convert ‘err’ (type ‘fr::Socket::Status’) to type ‘char’
               std::cerr << "Failed to receive request from client: " << err << std::endl;
                                                                         ^~~
    
    In file included from /usr/include/c++/8/iostream:39,
                     from /home/panda/frnetlib-master/examples/simple_http_server_and_client/SimpleHttpServer.cpp:8:
    /usr/include/c++/8/ostream:514:5: note: candidate: ‘template<class _Traits> std::basic_ostream<char, _Traits>& std::operator<<(std::basic_ostream<char, _Traits>&, signed char)’
         operator<<(basic_ostream<char, _Traits>& __out, signed char __c)
         ^~~~~~~~
    /usr/include/c++/8/ostream:514:5: note:   template argument deduction/substitution failed:
    /home/panda/frnetlib-master/examples/simple_http_server_and_client/SimpleHttpServer.cpp:36:71: note:   cannot convert ‘err’ (type ‘fr::Socket::Status’) to type ‘signed char’
               std::cerr << "Failed to receive request from client: " << err << std::endl;
                                                                         ^~~
    
    In file included from /usr/include/c++/8/iostream:39,
                     from /home/panda/frnetlib-master/examples/simple_http_server_and_client/SimpleHttpServer.cpp:8:
    /usr/include/c++/8/ostream:519:5: note: candidate: ‘template<class _Traits> std::basic_ostream<char, _Traits>& std::operator<<(std::basic_ostream<char, _Traits>&, unsigned char)’
         operator<<(basic_ostream<char, _Traits>& __out, unsigned char __c)
         ^~~~~~~~
    /usr/include/c++/8/ostream:519:5: note:   template argument deduction/substitution failed:
    /home/panda/frnetlib-master/examples/simple_http_server_and_client/SimpleHttpServer.cpp:36:71: note:   cannot convert ‘err’ (type ‘fr::Socket::Status’) to type ‘unsigned char’
               std::cerr << "Failed to receive request from client: " << err << std::endl;
                                                                         ^~~
    
    In file included from /usr/include/c++/8/iostream:39,
                     from /home/panda/frnetlib-master/examples/simple_http_server_and_client/SimpleHttpServer.cpp:8:
    /usr/include/c++/8/ostream:539:5: note: candidate: ‘template<class _CharT, class _Traits> std::basic_ostream<_CharT, _Traits>& std::operator<<(std::basic_ostream<_CharT, _Traits>&, const _CharT*)’
         operator<<(basic_ostream<_CharT, _Traits>& __out, const _CharT* __s)
         ^~~~~~~~
    /usr/include/c++/8/ostream:539:5: note:   template argument deduction/substitution failed:
    /home/panda/frnetlib-master/examples/simple_http_server_and_client/SimpleHttpServer.cpp:36:71: note:   mismatched types ‘const _CharT*’ and ‘fr::Socket::Status’
               std::cerr << "Failed to receive request from client: " << err << std::endl;
                                                                         ^~~
    
    In file included from /usr/include/c++/8/ostream:693,
                     from /usr/include/c++/8/iostream:39,
                     from /home/panda/frnetlib-master/examples/simple_http_server_and_client/SimpleHttpServer.cpp:8:
    /usr/include/c++/8/bits/ostream.tcc:321:5: note: candidate: ‘template<class _CharT, class _Traits> std::basic_ostream<_CharT, _Traits>& std::operator<<(std::basic_ostream<_CharT, _Traits>&, const char*)’
         operator<<(basic_ostream<_CharT, _Traits>& __out, const char* __s)
         ^~~~~~~~
    /usr/include/c++/8/bits/ostream.tcc:321:5: note:   template argument deduction/substitution failed:
    /home/panda/frnetlib-master/examples/simple_http_server_and_client/SimpleHttpServer.cpp:36:71: note:   cannot convert ‘err’ (type ‘fr::Socket::Status’) to type ‘const char*’
               std::cerr << "Failed to receive request from client: " << err << std::endl;
                                                                         ^~~
    
    In file included from /usr/include/c++/8/iostream:39,
                     from /home/panda/frnetlib-master/examples/simple_http_server_and_client/SimpleHttpServer.cpp:8:
    /usr/include/c++/8/ostream:556:5: note: candidate: ‘template<class _Traits> std::basic_ostream<char, _Traits>& std::operator<<(std::basic_ostream<char, _Traits>&, const char*)’
         operator<<(basic_ostream<char, _Traits>& __out, const char* __s)
         ^~~~~~~~
    /usr/include/c++/8/ostream:556:5: note:   template argument deduction/substitution failed:
    /home/panda/frnetlib-master/examples/simple_http_server_and_client/SimpleHttpServer.cpp:36:71: note:   cannot convert ‘err’ (type ‘fr::Socket::Status’) to type ‘const char*’
               std::cerr << "Failed to receive request from client: " << err << std::endl;
                                                                         ^~~
    
    In file included from /usr/include/c++/8/iostream:39,
                     from /home/panda/frnetlib-master/examples/simple_http_server_and_client/SimpleHttpServer.cpp:8:
    /usr/include/c++/8/ostream:569:5: note: candidate: ‘template<class _Traits> std::basic_ostream<char, _Traits>& std::operator<<(std::basic_ostream<char, _Traits>&, const signed char*)’
         operator<<(basic_ostream<char, _Traits>& __out, const signed char* __s)
         ^~~~~~~~
    /usr/include/c++/8/ostream:569:5: note:   template argument deduction/substitution failed:
    /home/panda/frnetlib-master/examples/simple_http_server_and_client/SimpleHttpServer.cpp:36:71: note:   cannot convert ‘err’ (type ‘fr::Socket::Status’) to type ‘const signed char*’
               std::cerr << "Failed to receive request from client: " << err << std::endl;
                                                                         ^~~
    
    In file included from /usr/include/c++/8/iostream:39,
                     from /home/panda/frnetlib-master/examples/simple_http_server_and_client/SimpleHttpServer.cpp:8:
    /usr/include/c++/8/ostream:574:5: note: candidate: ‘template<class _Traits> std::basic_ostream<char, _Traits>& std::operator<<(std::basic_ostream<char, _Traits>&, const unsigned char*)’
         operator<<(basic_ostream<char, _Traits>& __out, const unsigned char* __s)
         ^~~~~~~~
    /usr/include/c++/8/ostream:574:5: note:   template argument deduction/substitution failed:
    /home/panda/frnetlib-master/examples/simple_http_server_and_client/SimpleHttpServer.cpp:36:71: note:   cannot convert ‘err’ (type ‘fr::Socket::Status’) to type ‘const unsigned char*’
               std::cerr << "Failed to receive request from client: " << err << std::endl;
                                                                         ^~~
    
    In file included from /usr/include/c++/8/iostream:39,
                     from /home/panda/frnetlib-master/examples/simple_http_server_and_client/SimpleHttpServer.cpp:8:
    /usr/include/c++/8/ostream:682:5: note: candidate: ‘template<class _Ostream, class _Tp> typename std::enable_if<std::__and_<std::__not_<std::is_lvalue_reference<_Tp> >, std::__is_convertible_to_basic_ostream<_Ostream>, std::__is_insertable<typename std::__is_convertible_to_basic_ostream<_Tp>::__ostream_type, const _Tp&, void> >::value, typename std::__is_convertible_to_basic_ostream<_Tp>::__ostream_type>::type std::operator<<(_Ostream&&, const _Tp&)’
         operator<<(_Ostream&& __os, const _Tp& __x)
         ^~~~~~~~
    /usr/include/c++/8/ostream:682:5: note:   template argument deduction/substitution failed:
    /usr/include/c++/8/ostream: In substitution of ‘template<class _Ostream, class _Tp> typename std::enable_if<std::__and_<std::__not_<std::is_lvalue_reference<_Tp> >, std::__is_convertible_to_basic_ostream<_Ostream>, std::__is_insertable<typename std::__is_convertible_to_basic_ostream<_Tp>::__ostream_type, const _Tp&, void> >::value, typename std::__is_convertible_to_basic_ostream<_Tp>::__ostream_type>::type std::operator<<(_Ostream&&, const _Tp&) [with _Ostream = std::basic_ostream<char>&; _Tp = fr::Socket::Status]’:
    /home/panda/frnetlib-master/examples/simple_http_server_and_client/SimpleHttpServer.cpp:36:71:   required from here
    /usr/include/c++/8/ostream:682:5: error: no type named ‘type’ in ‘struct std::enable_if<false, std::basic_ostream<char>&>’
    /home/panda/frnetlib-master/examples/simple_http_server_and_client/SimpleHttpServer.cpp:44:57: error: ‘Success’ is not a member of ‘fr::Socket’
             if((err = client.send(response)) != fr::Socket::Success)
                                                             ^~~~~~~
    /home/panda/frnetlib-master/examples/simple_http_server_and_client/SimpleHttpServer.cpp:46:64: error: no match for ‘operator<<’ (operand types are ‘std::basic_ostream<char>’ and ‘fr::Socket::Status’)
                 std::cerr << "Failed to send response to client: " << err << std::endl;
                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~
    In file included from /usr/include/c++/8/iostream:39,
                     from /home/panda/frnetlib-master/examples/simple_http_server_and_client/SimpleHttpServer.cpp:8:
    /usr/include/c++/8/ostream:108:7: note: candidate: ‘std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(std::basic_ostream<_CharT, _Traits>::__ostream_type& (*)(std::basic_ostream<_CharT, _Traits>::__ostream_type&)) [with _CharT = char; _Traits = std::char_traits<char>; std::basic_ostream<_CharT, _Traits>::__ostream_type = std::basic_ostream<char>]’
           operator<<(__ostream_type& (*__pf)(__ostream_type&))
           ^~~~~~~~
    /usr/include/c++/8/ostream:108:7: note:   no known conversion for argument 1 from ‘fr::Socket::Status’ to ‘std::basic_ostream<char>::__ostream_type& (*)(std::basic_ostream<char>::__ostream_type&)’ {aka ‘std::basic_ostream<char>& (*)(std::basic_ostream<char>&)’}
    /usr/include/c++/8/ostream:117:7: note: candidate: ‘std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(std::basic_ostream<_CharT, _Traits>::__ios_type& (*)(std::basic_ostream<_CharT, _Traits>::__ios_type&)) [with _CharT = char; _Traits = std::char_traits<char>; std::basic_ostream<_CharT, _Traits>::__ostream_type = std::basic_ostream<char>; std::basic_ostream<_CharT, _Traits>::__ios_type = std::basic_ios<char>]’
           operator<<(__ios_type& (*__pf)(__ios_type&))
           ^~~~~~~~
    /usr/include/c++/8/ostream:117:7: note:   no known conversion for argument 1 from ‘fr::Socket::Status’ to ‘std::basic_ostream<char>::__ios_type& (*)(std::basic_ostream<char>::__ios_type&)’ {aka ‘std::basic_ios<char>& (*)(std::basic_ios<char>&)’}
    /usr/include/c++/8/ostream:127:7: note: candidate: ‘std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(std::ios_base& (*)(std::ios_base&)) [with _CharT = char; _Traits = std::char_traits<char>; std::basic_ostream<_CharT, _Traits>::__ostream_type = std::basic_ostream<char>]’
           operator<<(ios_base& (*__pf) (ios_base&))
           ^~~~~~~~
    /usr/include/c++/8/ostream:127:7: note:   no known conversion for argument 1 from ‘fr::Socket::Status’ to ‘std::ios_base& (*)(std::ios_base&)’
    /usr/include/c++/8/ostream:166:7: note: candidate: ‘std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(long int) [with _CharT = char; _Traits = std::char_traits<char>; std::basic_ostream<_CharT, _Traits>::__ostream_type = std::basic_ostream<char>]’
           operator<<(long __n)
           ^~~~~~~~
    /usr/include/c++/8/ostream:166:7: note:   no known conversion for argument 1 from ‘fr::Socket::Status’ to ‘long int’
    /usr/include/c++/8/ostream:170:7: note: candidate: ‘std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(long unsigned int) [with _CharT = char; _Traits = std::char_traits<char>; std::basic_ostream<_CharT, _Traits>::__ostream_type = std::basic_ostream<char>]’
           operator<<(unsigned long __n)
           ^~~~~~~~
    /usr/include/c++/8/ostream:170:7: note:   no known conversion for argument 1 from ‘fr::Socket::Status’ to ‘long unsigned int’
    /usr/include/c++/8/ostream:174:7: note: candidate: ‘std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(bool) [with _CharT = char; _Traits = std::char_traits<char>; std::basic_ostream<_CharT, _Traits>::__ostream_type = std::basic_ostream<char>]’
           operator<<(bool __n)
           ^~~~~~~~
    /usr/include/c++/8/ostream:174:7: note:   no known conversion for argument 1 from ‘fr::Socket::Status’ to ‘bool’
    In file included from /usr/include/c++/8/ostream:693,
                     from /usr/include/c++/8/iostream:39,
                     from /home/panda/frnetlib-master/examples/simple_http_server_and_client/SimpleHttpServer.cpp:8:
    /usr/include/c++/8/bits/ostream.tcc:91:5: note: candidate: ‘std::basic_ostream<_CharT, _Traits>& std::basic_ostream<_CharT, _Traits>::operator<<(short int) [with _CharT = char; _Traits = std::char_traits<char>]’
         basic_ostream<_CharT, _Traits>::
         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    /usr/include/c++/8/bits/ostream.tcc:91:5: note:   no known conversion for argument 1 from ‘fr::Socket::Status’ to ‘short int’
    In file included from /usr/include/c++/8/iostream:39,
                     from /home/panda/frnetlib-master/examples/simple_http_server_and_client/SimpleHttpServer.cpp:8:
    /usr/include/c++/8/ostream:181:7: note: candidate: ‘std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(short unsigned int) [with _CharT = char; _Traits = std::char_traits<char>; std::basic_ostream<_CharT, _Traits>::__ostream_type = std::basic_ostream<char>]’
           operator<<(unsigned short __n)
           ^~~~~~~~
    /usr/include/c++/8/ostream:181:7: note:   no known conversion for argument 1 from ‘fr::Socket::Status’ to ‘short unsigned int’
    In file included from /usr/include/c++/8/ostream:693,
                     from /usr/include/c++/8/iostream:39,
                     from /home/panda/frnetlib-master/examples/simple_http_server_and_client/SimpleHttpServer.cpp:8:
    /usr/include/c++/8/bits/ostream.tcc:105:5: note: candidate: ‘std::basic_ostream<_CharT, _Traits>& std::basic_ostream<_CharT, _Traits>::operator<<(int) [with _CharT = char; _Traits = std::char_traits<char>]’
         basic_ostream<_CharT, _Traits>::
         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    /usr/include/c++/8/bits/ostream.tcc:105:5: note:   no known conversion for argument 1 from ‘fr::Socket::Status’ to ‘int’
    In file included from /usr/include/c++/8/iostream:39,
                     from /home/panda/frnetlib-master/examples/simple_http_server_and_client/SimpleHttpServer.cpp:8:
    /usr/include/c++/8/ostream:192:7: note: candidate: ‘std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(unsigned int) [with _CharT = char; _Traits = std::char_traits<char>; std::basic_ostream<_CharT, _Traits>::__ostream_type = std::basic_ostream<char>]’
           operator<<(unsigned int __n)
           ^~~~~~~~
    /usr/include/c++/8/ostream:192:7: note:   no known conversion for argument 1 from ‘fr::Socket::Status’ to ‘unsigned int’
    /usr/include/c++/8/ostream:201:7: note: candidate: ‘std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(long long int) [with _CharT = char; _Traits = std::char_traits<char>; std::basic_ostream<_CharT, _Traits>::__ostream_type = std::basic_ostream<char>]’
           operator<<(long long __n)
           ^~~~~~~~
    /usr/include/c++/8/ostream:201:7: note:   no known conversion for argument 1 from ‘fr::Socket::Status’ to ‘long long int’
    /usr/include/c++/8/ostream:205:7: note: candidate: ‘std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(long long unsigned int) [with _CharT = char; _Traits = std::char_traits<char>; std::basic_ostream<_CharT, _Traits>::__ostream_type = std::basic_ostream<char>]’
           operator<<(unsigned long long __n)
           ^~~~~~~~
    /usr/include/c++/8/ostream:205:7: note:   no known conversion for argument 1 from ‘fr::Socket::Status’ to ‘long long unsigned int’
    /usr/include/c++/8/ostream:220:7: note: candidate: ‘std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(double) [with _CharT = char; _Traits = std::char_traits<char>; std::basic_ostream<_CharT, _Traits>::__ostream_type = std::basic_ostream<char>]’
           operator<<(double __f)
           ^~~~~~~~
    /usr/include/c++/8/ostream:220:7: note:   no known conversion for argument 1 from ‘fr::Socket::Status’ to ‘double’
    /usr/include/c++/8/ostream:224:7: note: candidate: ‘std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(float) [with _CharT = char; _Traits = std::char_traits<char>; std::basic_ostream<_CharT, _Traits>::__ostream_type = std::basic_ostream<char>]’
           operator<<(float __f)
           ^~~~~~~~
    /usr/include/c++/8/ostream:224:7: note:   no known conversion for argument 1 from ‘fr::Socket::Status’ to ‘float’
    /usr/include/c++/8/ostream:232:7: note: candidate: ‘std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(long double) [with _CharT = char; _Traits = std::char_traits<char>; std::basic_ostream<_CharT, _Traits>::__ostream_type = std::basic_ostream<char>]’
           operator<<(long double __f)
           ^~~~~~~~
    /usr/include/c++/8/ostream:232:7: note:   no known conversion for argument 1 from ‘fr::Socket::Status’ to ‘long double’
    /usr/include/c++/8/ostream:245:7: note: candidate: ‘std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(const void*) [with _CharT = char; _Traits = std::char_traits<char>; std::basic_ostream<_CharT, _Traits>::__ostream_type = std::basic_ostream<char>]’
           operator<<(const void* __p)
           ^~~~~~~~
    /usr/include/c++/8/ostream:245:7: note:   no known conversion for argument 1 from ‘fr::Socket::Status’ to ‘const void*’
    In file included from /usr/include/c++/8/ostream:693,
                     from /usr/include/c++/8/iostream:39,
                     from /home/panda/frnetlib-master/examples/simple_http_server_and_client/SimpleHttpServer.cpp:8:
    /usr/include/c++/8/bits/ostream.tcc:119:5: note: candidate: ‘std::basic_ostream<_CharT, _Traits>& std::basic_ostream<_CharT, _Traits>::operator<<(std::basic_ostream<_CharT, _Traits>::__streambuf_type*) [with _CharT = char; _Traits = std::char_traits<char>; std::basic_ostream<_CharT, _Traits>::__streambuf_type = std::basic_streambuf<char>]’
         basic_ostream<_CharT, _Traits>::
         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    /usr/include/c++/8/bits/ostream.tcc:119:5: note:   no known conversion for argument 1 from ‘fr::Socket::Status’ to ‘std::basic_ostream<char>::__streambuf_type*’ {aka ‘std::basic_streambuf<char>*’}
    In file included from /usr/include/c++/8/string:52,
                     from /home/panda/frnetlib-master/include/frnetlib/HttpRequest.h:7,
                     from /home/panda/frnetlib-master/examples/simple_http_server_and_client/SimpleHttpServer.cpp:5:
    /usr/include/c++/8/bits/basic_string.h:6323:5: note: candidate: ‘template<class _CharT, class _Traits, class _Alloc> std::basic_ostream<_CharT, _Traits>& std::operator<<(std::basic_ostream<_CharT, _Traits>&, const std::__cxx11::basic_string<_CharT, _Traits, _Alloc>&)’
         operator<<(basic_ostream<_CharT, _Traits>& __os,
         ^~~~~~~~
    /usr/include/c++/8/bits/basic_string.h:6323:5: note:   template argument deduction/substitution failed:
    /home/panda/frnetlib-master/examples/simple_http_server_and_client/SimpleHttpServer.cpp:46:67: note:   mismatched types ‘const std::__cxx11::basic_string<_CharT, _Traits, _Alloc>’ and ‘fr::Socket::Status’
                 std::cerr << "Failed to send response to client: " << err << std::endl;
                                                                       ^~~
    In file included from /usr/include/c++/8/memory:81,
                     from /home/panda/frnetlib-master/include/frnetlib/TcpSocket.h:8,
                     from /home/panda/frnetlib-master/include/frnetlib/HttpRequest.h:10,
                     from /home/panda/frnetlib-master/examples/simple_http_server_and_client/SimpleHttpServer.cpp:5:
    /usr/include/c++/8/bits/shared_ptr.h:66:5: note: candidate: ‘template<class _Ch, class _Tr, class _Tp, __gnu_cxx::_Lock_policy _Lp> std::basic_ostream<_CharT, _Traits>& std::operator<<(std::basic_ostream<_CharT, _Traits>&, const std::__shared_ptr<_Tp, _Lp>&)’
         operator<<(std::basic_ostream<_Ch, _Tr>& __os,
         ^~~~~~~~
    /usr/include/c++/8/bits/shared_ptr.h:66:5: note:   template argument deduction/substitution failed:
    /home/panda/frnetlib-master/examples/simple_http_server_and_client/SimpleHttpServer.cpp:46:67: note:   mismatched types ‘const std::__shared_ptr<_Tp, _Lp>’ and ‘fr::Socket::Status’
                 std::cerr << "Failed to send response to client: " << err << std::endl;
                                                                       ^~~
    In file included from /usr/include/c++/8/mutex:42,
                     from /home/panda/frnetlib-master/include/frnetlib/TcpSocket.h:9,
                     from /home/panda/frnetlib-master/include/frnetlib/HttpRequest.h:10,
                     from /home/panda/frnetlib-master/examples/simple_http_server_and_client/SimpleHttpServer.cpp:5:
    /usr/include/c++/8/system_error:217:5: note: candidate: ‘template<class _CharT, class _Traits> std::basic_ostream<_CharT, _Traits>& std::operator<<(std::basic_ostream<_CharT, _Traits>&, const std::error_code&)’
         operator<<(basic_ostream<_CharT, _Traits>& __os, const error_code& __e)
         ^~~~~~~~
    /usr/include/c++/8/system_error:217:5: note:   template argument deduction/substitution failed:
    /home/panda/frnetlib-master/examples/simple_http_server_and_client/SimpleHttpServer.cpp:46:67: note:   cannot convert ‘err’ (type ‘fr::Socket::Status’) to type ‘const std::error_code&’
                 std::cerr << "Failed to send response to client: " << err << std::endl;
                                                                       ^~~
    In file included from /usr/include/c++/8/iostream:39,
                     from /home/panda/frnetlib-master/examples/simple_http_server_and_client/SimpleHttpServer.cpp:8:
    /usr/include/c++/8/ostream:497:5: note: candidate: ‘template<class _CharT, class _Traits> std::basic_ostream<_CharT, _Traits>& std::operator<<(std::basic_ostream<_CharT, _Traits>&, _CharT)’
         operator<<(basic_ostream<_CharT, _Traits>& __out, _CharT __c)
         ^~~~~~~~
    /usr/include/c++/8/ostream:497:5: note:   template argument deduction/substitution failed:
    /home/panda/frnetlib-master/examples/simple_http_server_and_client/SimpleHttpServer.cpp:46:67: note:   deduced conflicting types for parameter ‘_CharT’ (‘char’ and ‘fr::Socket::Status’)
                 std::cerr << "Failed to send response to client: " << err << std::endl;
                                                                       ^~~
    In file included from /usr/include/c++/8/iostream:39,
                     from /home/panda/frnetlib-master/examples/simple_http_server_and_client/SimpleHttpServer.cpp:8:
    /usr/include/c++/8/ostream:502:5: note: candidate: ‘template<class _CharT, class _Traits> std::basic_ostream<_CharT, _Traits>& std::operator<<(std::basic_ostream<_CharT, _Traits>&, char)’
         operator<<(basic_ostream<_CharT, _Traits>& __out, char __c)
         ^~~~~~~~
    /usr/include/c++/8/ostream:502:5: note:   template argument deduction/substitution failed:
    /home/panda/frnetlib-master/examples/simple_http_server_and_client/SimpleHttpServer.cpp:46:67: note:   cannot convert ‘err’ (type ‘fr::Socket::Status’) to type ‘char’
                 std::cerr << "Failed to send response to client: " << err << std::endl;
                                                                       ^~~
    In file included from /usr/include/c++/8/iostream:39,
                     from /home/panda/frnetlib-master/examples/simple_http_server_and_client/SimpleHttpServer.cpp:8:
    /usr/include/c++/8/ostream:508:5: note: candidate: ‘template<class _Traits> std::basic_ostream<char, _Traits>& std::operator<<(std::basic_ostream<char, _Traits>&, char)’
         operator<<(basic_ostream<char, _Traits>& __out, char __c)
         ^~~~~~~~
    /usr/include/c++/8/ostream:508:5: note:   template argument deduction/substitution failed:
    /home/panda/frnetlib-master/examples/simple_http_server_and_client/SimpleHttpServer.cpp:46:67: note:   cannot convert ‘err’ (type ‘fr::Socket::Status’) to type ‘char’
                 std::cerr << "Failed to send response to client: " << err << std::endl;
                                                                       ^~~
    In file included from /usr/include/c++/8/iostream:39,
                     from /home/panda/frnetlib-master/examples/simple_http_server_and_client/SimpleHttpServer.cpp:8:
    /usr/include/c++/8/ostream:514:5: note: candidate: ‘template<class _Traits> std::basic_ostream<char, _Traits>& std::operator<<(std::basic_ostream<char, _Traits>&, signed char)’
         operator<<(basic_ostream<char, _Traits>& __out, signed char __c)
         ^~~~~~~~
    /usr/include/c++/8/ostream:514:5: note:   template argument deduction/substitution failed:
    /home/panda/frnetlib-master/examples/simple_http_server_and_client/SimpleHttpServer.cpp:46:67: note:   cannot convert ‘err’ (type ‘fr::Socket::Status’) to type ‘signed char’
                 std::cerr << "Failed to send response to client: " << err << std::endl;
                                                                       ^~~
    In file included from /usr/include/c++/8/iostream:39,
                     from /home/panda/frnetlib-master/examples/simple_http_server_and_client/SimpleHttpServer.cpp:8:
    /usr/include/c++/8/ostream:519:5: note: candidate: ‘template<class _Traits> std::basic_ostream<char, _Traits>& std::operator<<(std::basic_ostream<char, _Traits>&, unsigned char)’
         operator<<(basic_ostream<char, _Traits>& __out, unsigned char __c)
         ^~~~~~~~
    /usr/include/c++/8/ostream:519:5: note:   template argument deduction/substitution failed:
    /home/panda/frnetlib-master/examples/simple_http_server_and_client/SimpleHttpServer.cpp:46:67: note:   cannot convert ‘err’ (type ‘fr::Socket::Status’) to type ‘unsigned char’
                 std::cerr << "Failed to send response to client: " << err << std::endl;
                                                                       ^~~
    In file included from /usr/include/c++/8/iostream:39,
                     from /home/panda/frnetlib-master/examples/simple_http_server_and_client/SimpleHttpServer.cpp:8:
    /usr/include/c++/8/ostream:539:5: note: candidate: ‘template<class _CharT, class _Traits> std::basic_ostream<_CharT, _Traits>& std::operator<<(std::basic_ostream<_CharT, _Traits>&, const _CharT*)’
         operator<<(basic_ostream<_CharT, _Traits>& __out, const _CharT* __s)
         ^~~~~~~~
    /usr/include/c++/8/ostream:539:5: note:   template argument deduction/substitution failed:
    /home/panda/frnetlib-master/examples/simple_http_server_and_client/SimpleHttpServer.cpp:46:67: note:   mismatched types ‘const _CharT*’ and ‘fr::Socket::Status’
                 std::cerr << "Failed to send response to client: " << err << std::endl;
                                                                       ^~~
    In file included from /usr/include/c++/8/ostream:693,
                     from /usr/include/c++/8/iostream:39,
                     from /home/panda/frnetlib-master/examples/simple_http_server_and_client/SimpleHttpServer.cpp:8:
    /usr/include/c++/8/bits/ostream.tcc:321:5: note: candidate: ‘template<class _CharT, class _Traits> std::basic_ostream<_CharT, _Traits>& std::operator<<(std::basic_ostream<_CharT, _Traits>&, const char*)’
         operator<<(basic_ostream<_CharT, _Traits>& __out, const char* __s)
         ^~~~~~~~
    /usr/include/c++/8/bits/ostream.tcc:321:5: note:   template argument deduction/substitution failed:
    /home/panda/frnetlib-master/examples/simple_http_server_and_client/SimpleHttpServer.cpp:46:67: note:   cannot convert ‘err’ (type ‘fr::Socket::Status’) to type ‘const char*’
                 std::cerr << "Failed to send response to client: " << err << std::endl;
                                                                       ^~~
    In file included from /usr/include/c++/8/iostream:39,
                     from /home/panda/frnetlib-master/examples/simple_http_server_and_client/SimpleHttpServer.cpp:8:
    /usr/include/c++/8/ostream:556:5: note: candidate: ‘template<class _Traits> std::basic_ostream<char, _Traits>& std::operator<<(std::basic_ostream<char, _Traits>&, const char*)’
         operator<<(basic_ostream<char, _Traits>& __out, const char* __s)
         ^~~~~~~~
    /usr/include/c++/8/ostream:556:5: note:   template argument deduction/substitution failed:
    /home/panda/frnetlib-master/examples/simple_http_server_and_client/SimpleHttpServer.cpp:46:67: note:   cannot convert ‘err’ (type ‘fr::Socket::Status’) to type ‘const char*’
                 std::cerr << "Failed to send response to client: " << err << std::endl;
                                                                       ^~~
    In file included from /usr/include/c++/8/iostream:39,
                     from /home/panda/frnetlib-master/examples/simple_http_server_and_client/SimpleHttpServer.cpp:8:
    /usr/include/c++/8/ostream:569:5: note: candidate: ‘template<class _Traits> std::basic_ostream<char, _Traits>& std::operator<<(std::basic_ostream<char, _Traits>&, const signed char*)’
         operator<<(basic_ostream<char, _Traits>& __out, const signed char* __s)
         ^~~~~~~~
    /usr/include/c++/8/ostream:569:5: note:   template argument deduction/substitution failed:
    /home/panda/frnetlib-master/examples/simple_http_server_and_client/SimpleHttpServer.cpp:46:67: note:   cannot convert ‘err’ (type ‘fr::Socket::Status’) to type ‘const signed char*’
                 std::cerr << "Failed to send response to client: " << err << std::endl;
                                                                       ^~~
    In file included from /usr/include/c++/8/iostream:39,
                     from /home/panda/frnetlib-master/examples/simple_http_server_and_client/SimpleHttpServer.cpp:8:
    /usr/include/c++/8/ostream:574:5: note: candidate: ‘template<class _Traits> std::basic_ostream<char, _Traits>& std::operator<<(std::basic_ostream<char, _Traits>&, const unsigned char*)’
         operator<<(basic_ostream<char, _Traits>& __out, const unsigned char* __s)
         ^~~~~~~~
    /usr/include/c++/8/ostream:574:5: note:   template argument deduction/substitution failed:
    /home/panda/frnetlib-master/examples/simple_http_server_and_client/SimpleHttpServer.cpp:46:67: note:   cannot convert ‘err’ (type ‘fr::Socket::Status’) to type ‘const unsigned char*’
                 std::cerr << "Failed to send response to client: " << err << std::endl;
                                                                       ^~~
    In file included from /usr/include/c++/8/iostream:39,
                     from /home/panda/frnetlib-master/examples/simple_http_server_and_client/SimpleHttpServer.cpp:8:
    /usr/include/c++/8/ostream:682:5: note: candidate: ‘template<class _Ostream, class _Tp> typename std::enable_if<std::__and_<std::__not_<std::is_lvalue_reference<_Tp> >, std::__is_convertible_to_basic_ostream<_Ostream>, std::__is_insertable<typename std::__is_convertible_to_basic_ostream<_Tp>::__ostream_type, const _Tp&, void> >::value, typename std::__is_convertible_to_basic_ostream<_Tp>::__ostream_type>::type std::operator<<(_Ostream&&, const _Tp&)’
         operator<<(_Ostream&& __os, const _Tp& __x)
         ^~~~~~~~
    /usr/include/c++/8/ostream:682:5: note:   template argument deduction/substitution failed:
    /usr/include/c++/8/ostream: In substitution of ‘template<class _Ostream, class _Tp> typename std::enable_if<std::__and_<std::__not_<std::is_lvalue_reference<_Tp> >, std::__is_convertible_to_basic_ostream<_Ostream>, std::__is_insertable<typename std::__is_convertible_to_basic_ostream<_Tp>::__ostream_type, const _Tp&, void> >::value, typename std::__is_convertible_to_basic_ostream<_Tp>::__ostream_type>::type std::operator<<(_Ostream&&, const _Tp&) [with _Ostream = std::basic_ostream<char>&; _Tp = fr::Socket::Status]’:
    /home/panda/frnetlib-master/examples/simple_http_server_and_client/SimpleHttpServer.cpp:46:67:   required from here
    /usr/include/c++/8/ostream:682:5: error: no type named ‘type’ in ‘struct std::enable_if<false, std::basic_ostream<char>&>’
    make[2]: *** [examples/simple_http_server_and_client/CMakeFiles/simple_http_server.dir/build.make:63: examples/simple_http_server_and_client/CMakeFiles/simple_http_server.dir/SimpleHttpServer.cpp.o] Error 1
    make[1]: *** [CMakeFiles/Makefile2:265: examples/simple_http_server_and_client/CMakeFiles/simple_http_server.dir/all] Error 2
    make: *** [Makefile:130: all] Error 2
    
    
    
  • Compile Errors with VS2017

    Compile Errors with VS2017

    I got some compile errors with Visual Studio 2017.

    Schweregrad	Code	Beschreibung	Projekt	Datei	Zeile	Unterdrückungszustand
    Fehler	C3861	"htonll": Bezeichner wurde nicht gefunden.	frnetlib	c:\users\dennis\downloads\neutest1234\include\frnetlib\NetworkEncoding.h	87	
    
    Schweregrad	Code	Beschreibung	Projekt	Datei	Zeile	Unterdrückungszustand
    Fehler	C3861	"ntohll": Bezeichner wurde nicht gefunden.	frnetlib	c:\users\dennis\downloads\neutest1234\include\frnetlib\NetworkEncoding.h	96	
    

    Possible Fix: Change #include <cstring> to #include <string>

    Schweregrad	Code	Beschreibung	Projekt	Datei	Zeile	Unterdrückungszustand
    Fehler	C2512	"std::logic_error": Kein geeigneter Standardkonstruktor verfügbar	frnetlib	C:\Users\Dennis\Downloads\neutest1234\src\Socket.cpp	120	
    
    Schweregrad	Code	Beschreibung	Projekt	Datei	Zeile	Unterdrückungszustand
    Fehler	C2512	"std::runtime_error": Kein geeigneter Standardkonstruktor verfügbar	frnetlib	c:\users\dennis\downloads\neutest1234\include\frnetlib\NetworkEncoding.h	134	
    
    Schweregrad	Code	Beschreibung	Projekt	Datei	Zeile	Unterdrückungszustand
    Fehler	C3861	"to_string": Bezeichner wurde nicht gefunden.	frnetlib	c:\users\dennis\downloads\neutest1234\include\frnetlib\NetworkEncoding.h	134	
    

    Possible Fix: Add #include <ctime> in WebSocket.h

    Schweregrad	Code	Beschreibung	Projekt	Datei	Zeile	Unterdrückungszustand
    Fehler	C2039	"time": Ist kein Element von "std"	frnetlib	C:\Users\Dennis\Downloads\neutest1234\src\WebFrame.cpp	10	
    
  • Some cross-platform build issues and suggestions.

    Some cross-platform build issues and suggestions.

    It does look nicer and more organized, however,

    • I failed to build on win10+vs2015, especially the googletest part. But this time really no hurry, the demo example is enough for me right now.
    • Even on ubuntu14.05, I need to hand remove -lmbedtls -lmbedx509 -lmbedcrypto in CMAKE_CXX_FLAGS since I do not want to use the SSL function.
    • I think it makes things easier that the examples separated with main codebase so that people can just extract out the examples and do their own stuff. (Could we meet both ends, say, standalone and complete CMakeLists.txt but still can be used for the test?)

    Regards,

    --MiaoDX

  • Build in windows.

    Build in windows.

    Hei, it seems that you are making a tiny and neat library and it should be cross-platform since there are so many platform specific codes, I am looking for a small lib with cross-platform ability and your example code seems appealing, but I failed to build in windows10 with vs2015. 😢 , there are tons of mistakes.

    cl : Command line warning D9002: ignoring unknown option '-m64',
    

    it seems that -m64 -fPIC -pthread -lmbedtls -lmbedx509 -lmbedcrypto are for linux, but they are just warnning.

    error C2556: 'float htonf(float)': overloaded function differs only by return type from 'unsigned int htonf(float)'
    
    error C2371: 'htonf': redefinition; different basic types
    
    [...]
    [many many similar errors]
    [...]
    
    frnetlib\src\SSLSocket.cpp(7): fatal error C1083: Cannot open include file: 'mbedtls/net_sockets.h': No such file or directory
    

    And the wrong messages is just too much, the first one I can understand, but I did not choose ssl at the very beginning, so why still need them? And the others just make me dizzy.

    So, 1.have you build on windows, or am I missing something important? Hope will have a doc tell about how to build. 2.Can I choose not to compile ssl at all? (I am not so into cmake, so is it possible?)

    Thanks for your time.

  • Build error

    Build error

    After "cmake ." [ 2%] Building CXX object CMakeFiles/frnetlib.dir/src/WebFrame.cpp.o In file included from /home/osboxes/mike/frnetlib/include/frnetlib/HttpRequest.h:11, from /home/osboxes/mike/frnetlib/include/frnetlib/WebSocket.h:10, from /home/osboxes/mike/frnetlib/src/WebFrame.cpp:6: /home/osboxes/mike/frnetlib/include/frnetlib/Http.h:17:10: fatal error: gtest/gtest.h: No such file or directory #include <gtest/gtest.h> ^~~~~~~~~~~~~~~

  • Some questions

    Some questions

    This may sound naive, and I apologize if it is.

    I am looking for a simple cross platform socket abstraction library, and everything on the README made sense to me.

    Then I saw this: https://github.com/Cloaked9000/frnetlib/blob/master/include/frnetlib/Socket.h#L50-L53

    I'm wondering what mutexes are used for here? Why does a socket need a mutex instead of it being the responsibility of the user of the Socket?

  • Make build with `SSL` support optional, and add some examples.

    Make build with `SSL` support optional, and add some examples.

    Hello, I change two lines in SSLListener.cpp and SSLSocket.cpp, so that we can build without SSL optional and smoothly. (Note that I did not try to use and build SSL by far ;) ).

    And I think it necessary to add example codes or test suites, I just give a possible example in the example folder, I think it would be better if you can make the example codes in README into truly and executable codes (with cmake) and test suite would be nice.

    And with find_package support seems appealing (I am not so into this part).

    Thanks again, I will try to port one of my old sockets programs (running on raspberry pi) to a cross-platform one based on this lib. (Just tried, and the main.cpp can be run successfully (without -m64 flag), will check other examples.)

    Regards.

    -- MiaoDX

  • the header name shall be lowercase,

    the header name shall be lowercase, "connection" instead of "Connection", because all header are added lowercase

    https://github.com/Cloaked9000/frnetlib/blob/7b4074dab2ddc2f4ceabb0303c4f2fad5f0e975a/src/HttpRequest.cpp#L146

    i am playing with websocket client, and i spend hours to figure out that the header "connection" is duplicated

    "connection" : "upgrade" "Connection" : "keep-alive"

    regards, Omari

  • Add a pkg-config file to the project.

    Add a pkg-config file to the project.

    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.

  • How much C++11 is in this, actually?

    How much C++11 is in this, actually?

    I have been trying to find a proper, small, easily embeddable cross-platform networking library (quite a mouthful, I know) for a project that I am working on. Unfortunately, since I want to be as cross-platform as possible, I try to be ISO C++98 compliant; that way, more compilers are supported. This attempt might be foolish in 2020, but you never know. :)

    Anyway, since the README mentions that C++11 is required, I wanted to know "how much" C++11 is in there and if it would, in theory, be possible to backport it to C++98?

    Kind regards, Ingwie

  • More examples, and fix the link problem in linux introduced by my careless.

    More examples, and fix the link problem in linux introduced by my careless.

    1. I forget to set the FRNETLIB_LIB for Linux and Mac (note, did not check Mac), sorry for this. 2.Add tcpsocket_server and tcpsocket_client, and by far, these are what I needed for my previous program's migration.

    I checked this code (tcpsocket example) on win10+vs2015, ubuntu14.05 and raspberry pi. I will leave other examples to you.

    Regards,

    -- MiaoDX

  • URL: add missing protocols : URL::WS and URL::WSS

    URL: add missing protocols : URL::WS and URL::WSS

    URL.h: enum Scheme { HTTP = 0, HTTPS = 1, FTP = 2, MAILTO = 3, IRC = 4, SFTP = 5, WS = 6, WSS = 7, Unknown = 99 };

    URL.cpp: std::unordered_map<std::string, URL::Scheme> URL::scheme_string_map = { {"http", URL::HTTP}, {"https", URL::HTTPS}, {"sftp", URL::FTP}, {"mailto", URL::MAILTO}, {"irc", URL::IRC}, {"sftp", URL::SFTP}, {"ws", URL::WS}, {"wss", URL::WSS} };

Ultra fast and low latency asynchronous socket server & client C++ library with support TCP, SSL, UDP, HTTP, HTTPS, WebSocket protocols and 10K connections problem solution
Ultra fast and low latency asynchronous socket server & client C++ library with support TCP, SSL, UDP, HTTP, HTTPS, WebSocket protocols and 10K connections problem solution

CppServer Ultra fast and low latency asynchronous socket server & client C++ library with support TCP, SSL, UDP, HTTP, HTTPS, WebSocket protocols and

Jan 3, 2023
Thc-ipv6 - IPv6 attack toolkit

THC-IPV6-ATTACK-TOOLKIT (c) 2005-2022 [email protected] https://github.com/vanhauser-thc/thc-ipv6 Licensed under AGPLv3 (see LICENSE file) INTRODUCTION Th

Jan 8, 2023
Mongoose Embedded Web Server Library - a multi-protocol embedded networking library with TCP/UDP, HTTP, WebSocket, MQTT built-in protocols, async DNS resolver, and non-blocking API.
Mongoose Embedded Web Server Library - a multi-protocol embedded networking library with TCP/UDP, HTTP, WebSocket,  MQTT built-in protocols, async DNS resolver, and non-blocking API.

Mongoose - Embedded Web Server / Embedded Networking Library Mongoose is a networking library for C/C++. It implements event-driven non-blocking APIs

Jan 1, 2023
Cross-platform, efficient, customizable, and robust asynchronous HTTP/WebSocket server C++14 library with the right balance between performance and ease of use

What Is RESTinio? RESTinio is a header-only C++14 library that gives you an embedded HTTP/Websocket server. It is based on standalone version of ASIO

Jan 6, 2023
Pushpin is a reverse proxy server written in C++ that makes it easy to implement WebSocket, HTTP streaming, and HTTP long-polling services.
Pushpin is a reverse proxy server written in C++ that makes it easy to implement WebSocket, HTTP streaming, and HTTP long-polling services.

Pushpin is a reverse proxy server written in C++ that makes it easy to implement WebSocket, HTTP streaming, and HTTP long-polling services. The project is unique among realtime push solutions in that it is designed to address the needs of API creators. Pushpin is transparent to clients and integrates easily into an API stack.

Jan 2, 2023
cuehttp is a modern c++ middleware framework for http(http/https)/websocket(ws/wss).

cuehttp 简介 cuehttp是一个使用Modern C++(C++17)编写的跨平台、高性能、易用的HTTP/WebSocket框架。基于中间件模式可以方便、高效、优雅的增加功能。cuehttp基于boost.asio开发,使用picohttpparser进行HTTP协议解析。内部依赖了nl

Dec 17, 2022
XMap is a fast network scanner designed for performing Internet-wide IPv6 & IPv4 network research scanning.

XMap is reimplemented and improved thoroughly from ZMap and is fully compatible with ZMap, armed with the "5 minutes" probing speed and novel scanning techniques. XMap is capable of scanning the 32-bits address space in under 45 minutes.

Dec 24, 2022
The C++ Network Library Project -- cross-platform, standards compliant networking library.

C++ Network Library Modern C++ network programming libraries. Join us on Slack: http://slack.cpp-netlib.org/ Subscribe to the mailing list: https://gr

Dec 27, 2022
H2O - the optimized HTTP/1, HTTP/2, HTTP/3 server

H2O - an optimized HTTP server with support for HTTP/1.x, HTTP/2 and HTTP/3 (experimental) Copyright (c) 2014-2019 DeNA Co., Ltd., Kazuho Oku, Tatsuhi

Dec 30, 2022
websocket and http client and server library, coming with ws, a command line swiss army knife utility

Hello world IXWebSocket is a C++ library for WebSocket client and server development. It has minimal dependencies (no boost), is very simple to use an

Jan 5, 2023
Dec 15, 2022
a lightweight and performant multicast DNS (mDNS) reflector with modern design, supports zone based reflection and IPv6

mDNS Reflector mDNS Reflector (mdns-reflector) is a lightweight and performant multicast DNS (mDNS) reflector with a modern design. It reflects mDNS q

Dec 10, 2022
Gromox - Groupware server backend with MAPI/HTTP, RPC/HTTP, IMAP, POP3 and PHP-MAPI support for grommunio

Gromox is the central groupware server component of grommunio. It is capable of serving as a replacement for Microsoft Exchange and compatibles. Conne

Dec 26, 2022
HTTP and WebSocket built on Boost.Asio in C++11
HTTP and WebSocket built on Boost.Asio in C++11

HTTP and WebSocket built on Boost.Asio in C++11 Branch Linux/OSX Windows Coverage Documentation Matrix master develop Contents Introduction Appearance

Jan 4, 2023
Simple embeddable C++11 async tcp,http and websocket serving.

net11 Simple embeddable C++11 async tcp,http and websocket serving. What is it? An easily embeddable C++11 networking library designed to make buildin

Mar 28, 2020
RakNet is a cross platform, open source, C++ networking engine for game programmers.

RakNet 4.081 Copyright (c) 2014, Oculus VR, Inc. Package notes The Help directory contains index.html, which is full help documentation in HTML format

Dec 30, 2022
RakNet is a cross platform, open source, C++ networking engine for game programmers.

RakNet 4.081 Copyright (c) 2014, Oculus VR, Inc. Package notes The Help directory contains index.html, which is full help documentation in HTML format

Dec 30, 2022
This is a small library that allows to stream a Dear ImGui scene to multiple WebSocket clients at once
This is a small library that allows to stream a Dear ImGui scene to multiple WebSocket clients at once

imgui-ws Dear ImGui over WebSockets This is a small library that allows to stream a Dear ImGui scene to multiple WebSocket clients at once. This is ac

Dec 30, 2022
Simple and small reliable UDP networking library for games

libquicknet Simple and small reliable UDP networking library for games ❗ libquicknet is under development and not suitable for production code ❗ The m

Oct 26, 2022