Log socket errors

Do not silently ignore close() and shutdown() errors, and use perror()
to get the errno.
This commit is contained in:
Romain Vimont
2018-02-16 14:55:33 +01:00
parent 37af0c8076
commit 6db22ef339
5 changed files with 26 additions and 14 deletions

View File

@@ -31,6 +31,6 @@ ssize_t net_send(socket_t socket, void *buf, size_t len);
ssize_t net_send_all(socket_t socket, void *buf, size_t len);
// how is SHUT_RD (read), SHUT_WR (write) or SHUT_RDWR (both)
SDL_bool net_shutdown(socket_t socket, int how);
void net_close(socket_t socket);
SDL_bool net_close(socket_t socket);
#endif