aboutsummaryrefslogtreecommitdiff
path: root/src/os/win32/ngx_socket.c
diff options
context:
space:
mode:
authorIgor Sysoev <igor@sysoev.ru>2002-08-16 15:27:03 +0000
committerIgor Sysoev <igor@sysoev.ru>2002-08-16 15:27:03 +0000
commite0af1b89dcd100462a3195534b2f78a838ca85b5 (patch)
tree9c9eb63c71b13cc9159209e39eb099c54c6cb6b1 /src/os/win32/ngx_socket.c
parent0c331d9f666b4f9be91009b7caea457e58a80779 (diff)
downloadnginx-e0af1b89dcd100462a3195534b2f78a838ca85b5.tar.gz
nginx-e0af1b89dcd100462a3195534b2f78a838ca85b5.zip
nginx-0.0.1-2002-08-16-19:27:03 import
Diffstat (limited to 'src/os/win32/ngx_socket.c')
-rw-r--r--src/os/win32/ngx_socket.c22
1 files changed, 22 insertions, 0 deletions
diff --git a/src/os/win32/ngx_socket.c b/src/os/win32/ngx_socket.c
new file mode 100644
index 000000000..590eb08e7
--- /dev/null
+++ b/src/os/win32/ngx_socket.c
@@ -0,0 +1,22 @@
+#include <nxg_config.h>
+
+#include <nxg_log.h>
+#include <nxg_errno.h>
+#include <nxg_socket.h>
+
+
+void ngx_init_sockets(ngx_log_t *log)
+{
+ WSADATA wsd;
+
+ if (WSAStartup(MAKEWORD(2,2), &wsd) != 0)
+ ngx_log_error(NGX_LOG_EMERG, log, ngx_socket_errno,
+ "ngx_init_sockets: WSAStartup failed");
+}
+
+int ngx_nonblocking(ngx_socket_t s)
+{
+ unsigned long nb = 1;
+
+ return ioctlsocket(s, FIONBIO, &nb);
+}