summaryrefslogtreecommitdiffstats
path: root/nanohttp/nanohttp-socket.h
diff options
context:
space:
mode:
Diffstat (limited to 'nanohttp/nanohttp-socket.h')
-rw-r--r--nanohttp/nanohttp-socket.h17
1 files changed, 8 insertions, 9 deletions
diff --git a/nanohttp/nanohttp-socket.h b/nanohttp/nanohttp-socket.h
index f5f8aa7..63d55dd 100644
--- a/nanohttp/nanohttp-socket.h
+++ b/nanohttp/nanohttp-socket.h
@@ -1,5 +1,5 @@
/******************************************************************
- * $Id: nanohttp-socket.h,v 1.23 2006/02/27 00:26:23 snowdrop Exp $
+ * $Id: nanohttp-socket.h,v 1.24 2006/02/27 22:26:02 snowdrop Exp $
*
* CSOAP Project: A http client/server library in C
* Copyright (C) 2003 Ferhat Ayaz
@@ -24,14 +24,10 @@
#ifndef NANO_HTTP_SOCKET_H
#define NANO_HTTP_SOCKET_H
-#ifdef __cplusplus
-extern "C" {
-#endif
+#include <time.h>
#include <nanohttp/nanohttp-common.h>
-#include <time.h>
-
#ifdef HAVE_SSL
#include <openssl/ssl.h>
#endif
@@ -40,6 +36,7 @@ extern "C" {
#include <winsock2.h>
#endif
+#define HSOCKET_FREE -1
/*
Socket definition
@@ -55,7 +52,7 @@ typedef struct hsocket_t
#ifdef WIN32
SOCKET sock;
#else
- int sock;
+ volatile int sock;
#endif
int block;
@@ -65,7 +62,9 @@ typedef struct hsocket_t
typedef int socklen_t;
#endif
-
+#ifdef __cplusplus
+extern "C" {
+#endif
/**
@@ -145,7 +144,7 @@ herror_t hsocket_open(hsocket_t * sock, const char *host, int port);
@param sock the socket to close
*/
-void hsocket_close(hsocket_t sock);
+void hsocket_close(hsocket_t *sock);
/**