aboutsummaryrefslogtreecommitdiffhomepage
path: root/include
diff options
context:
space:
mode:
authorLee Salzman <[email protected]>2012-09-18 16:38:10 +0300
committerLee Salzman <[email protected]>2012-09-18 16:38:10 +0300
commit0e0ace781b3d41c08d310e678f4e08e323a6a3b8 (patch)
treec1bfa74351a74ab5b00ec2a5fe9e74d8b415a1a7 /include
parent74d4c4a88fb274b068352512d8d0dfa3ff819d56 (diff)
downloadenet-0e0ace781b3d41c08d310e678f4e08e323a6a3b8.tar.gz
enet-0e0ace781b3d41c08d310e678f4e08e323a6a3b8.zip
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.
Diffstat (limited to 'include')
-rw-r--r--include/enet/enet.h8
1 files changed, 8 insertions, 0 deletions
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);