diff options
Diffstat (limited to 'lib/net')
-rw-r--r-- | lib/net/server.c | 4 | ||||
-rw-r--r-- | lib/net/server.h | 3 |
2 files changed, 3 insertions, 4 deletions
diff --git a/lib/net/server.c b/lib/net/server.c index 48213fb..3668462 100644 --- a/lib/net/server.c +++ b/lib/net/server.c @@ -49,8 +49,8 @@ void server_shutdown(server_t* srv) { } } -conn_t* conn_try_accept(server_t* srv) { - int client_socket_fd = accept4(srv->listen_socket_fd, NULL, NULL, SOCK_NONBLOCK); +conn_t* server_try_accept(server_t* srv) { + int client_socket_fd = accept(srv->listen_socket_fd, NULL, NULL); if (client_socket_fd == -1) { if (errno == EAGAIN || errno == EWOULDBLOCK) { return NULL; diff --git a/lib/net/server.h b/lib/net/server.h index b363724..cf048c3 100644 --- a/lib/net/server.h +++ b/lib/net/server.h @@ -10,7 +10,6 @@ typedef struct { server_t* server_init_tcp(const char* addr, const char* port); void server_shutdown(server_t* srv); -conn_t* conn_try_accept(server_t* srv); -void conn_close(conn_t* conn); +conn_t* server_try_accept(server_t* srv); #endif // NET__SERVER_H |