Use select on accept call as well so that server closes on Linux

This commit is contained in:
Adam Honse 2020-05-02 00:23:55 -05:00
parent 1c59ef6b80
commit 2fe958783c
2 changed files with 133 additions and 8 deletions

View file

@ -36,7 +36,8 @@ protected:
std::thread * ConnectionThread;
private:
net_port port;
SOCKET server_sock;
int accept_select(int sockfd, struct sockaddr *addr, socklen_t *addrlen);
int recv_select(SOCKET s, char *buf, int len, int flags);
};