comparison src/os/win32/ngx_wsasend_chain.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
63 63
64 #endif 64 #endif
65 65
66 wev = c->write; 66 wev = c->write;
67 67
68 if (((ngx_event_flags & NGX_HAVE_AIO_EVENT) && !wev->ready) 68 if (((ngx_event_flags & NGX_USE_AIO_EVENT) && !wev->ready)
69 || ((ngx_event_flags & NGX_HAVE_AIO_EVENT) == 0)) 69 || ((ngx_event_flags & NGX_USE_AIO_EVENT) == 0))
70 { 70 {
71 /* 71 /*
72 * WSABUFs must be 4-byte aligned otherwise 72 * WSABUFs must be 4-byte aligned otherwise
73 * WSASend() will return undocumented WSAEINVAL error. 73 * WSASend() will return undocumented WSAEINVAL error.
74 */ 74 */
92 wsabuf->len = ce->hunk->last - ce->hunk->pos; 92 wsabuf->len = ce->hunk->last - ce->hunk->pos;
93 prev = ce->hunk->last; 93 prev = ce->hunk->last;
94 } 94 }
95 } 95 }
96 96
97 if (ngx_event_flags & NGX_HAVE_AIO_EVENT) { 97 if (ngx_event_flags & NGX_USE_AIO_EVENT) {
98 ovlp = (LPWSAOVERLAPPED) &c->write->ovlp; 98 ovlp = (LPWSAOVERLAPPED) &c->write->ovlp;
99 ngx_memzero(ovlp, sizeof(WSAOVERLAPPED)); 99 ngx_memzero(ovlp, sizeof(WSAOVERLAPPED));
100 100
101 } else { 101 } else {
102 ovlp = NULL; 102 ovlp = NULL;
118 return NGX_CHAIN_ERROR; 118 return NGX_CHAIN_ERROR;
119 } 119 }
120 120
121 } else { 121 } else {
122 122
123 if (ngx_event_flags & NGX_HAVE_IOCP_EVENT) { 123 if (ngx_event_flags & NGX_USE_IOCP_EVENT) {
124 124
125 /* 125 /*
126 * If a socket was bound with I/O completion port then 126 * If a socket was bound with I/O completion port then
127 * GetQueuedCompletionStatus() would anyway return its status 127 * GetQueuedCompletionStatus() would anyway return its status
128 * despite that WSASend() was already completed. 128 * despite that WSASend() was already completed.
131 sent = 0; 131 sent = 0;
132 } 132 }
133 } 133 }
134 134
135 } else { 135 } else {
136 if (ngx_event_flags & NGX_HAVE_IOCP_EVENT) { 136 if (ngx_event_flags & NGX_USE_IOCP_EVENT) {
137 wev->ready = 0; 137 wev->ready = 0;
138 138
139 /* the overlapped WSASend() completed */ 139 /* the overlapped WSASend() completed */
140 140
141 if (wev->ovlp.error) { 141 if (wev->ovlp.error) {