Send handshake in network byte order

The handshake value is 42. The server sends this on startup in response to a zero-length document.

Yes, that means the server replies with The Answer to The Ultimate Question of Life, the Universe, and Everything. It is unspecified whether the client properly interprets The Answer.
This commit is contained in:
Gregory A Lundberg 2018-01-03 20:09:55 -06:00
parent 5426c884dd
commit fbc0a142b0
No known key found for this signature in database
GPG key ID: 149484078AE8AE9E

View file

@ -53,7 +53,7 @@ void server_base::start_server()
acceptor_.listen();
serve();
handshake_response_.connection_num = 42;
handshake_response_.connection_num = htonl(42);
#ifndef _WIN32
sighup_.async_wait(