Mercurial > hg > nginx
comparison src/os/win32/ngx_wsarecv.c @ 144:ef8c87afcfc5
nginx-0.0.1-2003-10-12-20:49:16 import
author | Igor Sysoev <igor@sysoev.ru> |
---|---|
date | Sun, 12 Oct 2003 16:49:16 +0000 |
parents | 6dfda4cf5200 |
children | 1bf718ce0dde |
comparison
equal
deleted
inserted
replaced
143:5526213be452 | 144:ef8c87afcfc5 |
---|---|
15 LPWSAOVERLAPPED ovlp; | 15 LPWSAOVERLAPPED ovlp; |
16 | 16 |
17 rev = c->read; | 17 rev = c->read; |
18 bytes = 0; | 18 bytes = 0; |
19 | 19 |
20 if ((ngx_event_flags & NGX_HAVE_AIO_EVENT) && rev->ready) { | 20 if ((ngx_event_flags & NGX_USE_AIO_EVENT) && rev->ready) { |
21 rev->ready = 0; | 21 rev->ready = 0; |
22 | 22 |
23 /* the overlapped WSARecv() completed */ | 23 /* the overlapped WSARecv() completed */ |
24 | 24 |
25 if (ngx_event_flags & NGX_HAVE_IOCP_EVENT) { | 25 if (ngx_event_flags & NGX_USE_IOCP_EVENT) { |
26 if (rev->ovlp.error) { | 26 if (rev->ovlp.error) { |
27 ngx_log_error(NGX_LOG_ERR, c->log, rev->ovlp.error, | 27 ngx_log_error(NGX_LOG_ERR, c->log, rev->ovlp.error, |
28 "WSARecv() failed"); | 28 "WSARecv() failed"); |
29 return NGX_ERROR; | 29 return NGX_ERROR; |
30 } | 30 } |
42 } | 42 } |
43 | 43 |
44 return bytes; | 44 return bytes; |
45 } | 45 } |
46 | 46 |
47 if (ngx_event_flags & NGX_HAVE_AIO_EVENT) { | 47 if (ngx_event_flags & NGX_USE_AIO_EVENT) { |
48 ovlp = (LPWSAOVERLAPPED) &c->read->ovlp; | 48 ovlp = (LPWSAOVERLAPPED) &c->read->ovlp; |
49 ngx_memzero(ovlp, sizeof(WSAOVERLAPPED)); | 49 ngx_memzero(ovlp, sizeof(WSAOVERLAPPED)); |
50 | 50 |
51 } else { | 51 } else { |
52 ovlp = NULL; | 52 ovlp = NULL; |
73 ngx_log_error(NGX_LOG_CRIT, c->log, err, "WSARecv() failed"); | 73 ngx_log_error(NGX_LOG_CRIT, c->log, err, "WSARecv() failed"); |
74 return NGX_ERROR; | 74 return NGX_ERROR; |
75 } | 75 } |
76 } | 76 } |
77 | 77 |
78 if (ngx_event_flags & NGX_HAVE_IOCP_EVENT) { | 78 if (ngx_event_flags & NGX_USE_IOCP_EVENT) { |
79 | 79 |
80 /* | 80 /* |
81 * If a socket was bound with I/O completion port | 81 * If a socket was bound with I/O completion port |
82 * then GetQueuedCompletionStatus() would anyway return its status | 82 * then GetQueuedCompletionStatus() would anyway return its status |
83 * despite that WSARecv() was already completed. | 83 * despite that WSARecv() was already completed. |