Use select on accept call as well so that server closes on Linux
This commit is contained in:
parent
1c59ef6b80
commit
2fe958783c
2 changed files with 133 additions and 8 deletions
|
|
@ -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);
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue