Working clock stream. Propagate up write errors

This commit is contained in:
Ian Gulliver
2019-04-29 00:11:07 +00:00
parent 4d4525b145
commit 205b8253b2
11 changed files with 92 additions and 13 deletions

View File

@@ -1,5 +1,6 @@
#include <arpa/inet.h>
#include <netinet/in.h>
#include <signal.h>
#include <sys/socket.h>
#include <thread>
@@ -10,6 +11,8 @@ FastCGIServer::FastCGIServer(int port, const std::function<void(std::unique_ptr<
: callback_(callback) {
LOG(INFO) << "listening on [::1]:" << port;
signal(SIGPIPE, SIG_IGN);
listen_sock_ = socket(AF_INET6, SOCK_STREAM, 0);
PCHECK(listen_sock_ >= 0) << "socket()";