Mercurial > hg > nginx-quic
view src/os/win32/ngx_socket.c @ 34:95f1c2a938f3
nginx-0.0.1-2002-12-20-09:54:55 import
author | Igor Sysoev <igor@sysoev.ru> |
---|---|
date | Fri, 20 Dec 2002 06:54:55 +0000 |
parents | 34a521b1a148 |
children | e8cdc2989cee |
line wrap: on
line source
#include <ngx_config.h> #include <ngx_log.h> #include <ngx_errno.h> #include <ngx_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"); /* get AcceptEx(), TransmitFile() functions */ } int ngx_nonblocking(ngx_socket_t s) { unsigned long nb = 1; return ioctlsocket(s, FIONBIO, &nb); } int ngx_blocking(ngx_socket_t s) { unsigned long nb = 0; return ioctlsocket(s, FIONBIO, &nb); }