From 0e0ace781b3d41c08d310e678f4e08e323a6a3b8 Mon Sep 17 00:00:00 2001 From: Lee Salzman Date: Tue, 18 Sep 2012 16:38:10 +0300 Subject: merging some things from Ryan C. Gordon (icculus): enet_socket_connect() shouldn't fail with non-blocking sockets. Removed unused variable. Sanity check for possible NULL dereference reported by clang's static…analysis. Added an interface to shutdown(). Fixed typo in the comments. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- include/enet/enet.h | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'include') diff --git a/include/enet/enet.h b/include/enet/enet.h index 3958d1c..b3ad438 100644 --- a/include/enet/enet.h +++ b/include/enet/enet.h @@ -55,6 +55,13 @@ typedef enum _ENetSocketOption ENET_SOCKOPT_SNDTIMEO = 7 } ENetSocketOption; +typedef enum _ENetSocketShutdown +{ + ENET_SOCKET_SHUTDOWN_READ = 0, + ENET_SOCKET_SHUTDOWN_WRITE = 1, + ENET_SOCKET_SHUTDOWN_READ_WRITE = 2 +} ENetSocketShutdown; + enum { ENET_HOST_ANY = 0, /**< specifies the default server host */ @@ -460,6 +467,7 @@ ENET_API int enet_socket_send (ENetSocket, const ENetAddress *, const ENe ENET_API int enet_socket_receive (ENetSocket, ENetAddress *, ENetBuffer *, size_t); ENET_API int enet_socket_wait (ENetSocket, enet_uint32 *, enet_uint32); ENET_API int enet_socket_set_option (ENetSocket, ENetSocketOption, int); +ENET_API int enet_socket_shutdown (ENetSocket, ENetSocketShutdown); ENET_API void enet_socket_destroy (ENetSocket); ENET_API int enet_socketset_select (ENetSocket, ENetSocketSet *, ENetSocketSet *, enet_uint32); -- cgit v1.2.3