Mercurial > hg > nginx
comparison src/os/win32/ngx_socket.c @ 2:ffffe1499bce
nginx-0.0.1-2002-08-16-19:27:03 import
author | Igor Sysoev <igor@sysoev.ru> |
---|---|
date | Fri, 16 Aug 2002 15:27:03 +0000 |
parents | |
children | 34a521b1a148 |
comparison
equal
deleted
inserted
replaced
1:d220029ac7f3 | 2:ffffe1499bce |
---|---|
1 #include <nxg_config.h> | |
2 | |
3 #include <nxg_log.h> | |
4 #include <nxg_errno.h> | |
5 #include <nxg_socket.h> | |
6 | |
7 | |
8 void ngx_init_sockets(ngx_log_t *log) | |
9 { | |
10 WSADATA wsd; | |
11 | |
12 if (WSAStartup(MAKEWORD(2,2), &wsd) != 0) | |
13 ngx_log_error(NGX_LOG_EMERG, log, ngx_socket_errno, | |
14 "ngx_init_sockets: WSAStartup failed"); | |
15 } | |
16 | |
17 int ngx_nonblocking(ngx_socket_t s) | |
18 { | |
19 unsigned long nb = 1; | |
20 | |
21 return ioctlsocket(s, FIONBIO, &nb); | |
22 } |