Mercurial > hg > nginx-quic
annotate src/os/win32/ngx_socket.h @ 8717:e06283038ec8 quic
QUIC: clear SSL_OP_ENABLE_MIDDLEBOX_COMPAT on SSL context switch.
The SSL_OP_ENABLE_MIDDLEBOX_COMPAT option is provided by QuicTLS and enabled
by default in the newly created SSL contexts. SSL_set_quic_method() is used
to clear it, which is required for SSL handshake to work on QUIC connections.
Switching context in the ngx_http_ssl_servername() SNI callback overrides SSL
options from the new SSL context. This results in the option set again.
Fix is to explicitly clear it when switching to another SSL context.
Initially reported here (in Russian):
http://mailman.nginx.org/pipermail/nginx-ru/2021-November/063989.html
author | Sergey Kandaurov <pluknet@nginx.com> |
---|---|
date | Tue, 07 Dec 2021 15:49:51 +0300 |
parents | efd71d49bde0 |
children | 96bdda15413a |
rev | line source |
---|---|
441
da8c5707af39
nginx-0.1.0-2004-09-28-12:34:51 import; set copyright and remove unused files
Igor Sysoev <igor@sysoev.ru>
parents:
294
diff
changeset
|
1 |
da8c5707af39
nginx-0.1.0-2004-09-28-12:34:51 import; set copyright and remove unused files
Igor Sysoev <igor@sysoev.ru>
parents:
294
diff
changeset
|
2 /* |
444
42d11f017717
nginx-0.1.0-2004-09-29-20:00:49 import; remove years from copyright
Igor Sysoev <igor@sysoev.ru>
parents:
441
diff
changeset
|
3 * Copyright (C) Igor Sysoev |
4412 | 4 * Copyright (C) Nginx, Inc. |
441
da8c5707af39
nginx-0.1.0-2004-09-28-12:34:51 import; set copyright and remove unused files
Igor Sysoev <igor@sysoev.ru>
parents:
294
diff
changeset
|
5 */ |
da8c5707af39
nginx-0.1.0-2004-09-28-12:34:51 import; set copyright and remove unused files
Igor Sysoev <igor@sysoev.ru>
parents:
294
diff
changeset
|
6 |
da8c5707af39
nginx-0.1.0-2004-09-28-12:34:51 import; set copyright and remove unused files
Igor Sysoev <igor@sysoev.ru>
parents:
294
diff
changeset
|
7 |
2
ffffe1499bce
nginx-0.0.1-2002-08-16-19:27:03 import
Igor Sysoev <igor@sysoev.ru>
parents:
diff
changeset
|
8 #ifndef _NGX_SOCKET_H_INCLUDED_ |
ffffe1499bce
nginx-0.0.1-2002-08-16-19:27:03 import
Igor Sysoev <igor@sysoev.ru>
parents:
diff
changeset
|
9 #define _NGX_SOCKET_H_INCLUDED_ |
ffffe1499bce
nginx-0.0.1-2002-08-16-19:27:03 import
Igor Sysoev <igor@sysoev.ru>
parents:
diff
changeset
|
10 |
ffffe1499bce
nginx-0.0.1-2002-08-16-19:27:03 import
Igor Sysoev <igor@sysoev.ru>
parents:
diff
changeset
|
11 |
ffffe1499bce
nginx-0.0.1-2002-08-16-19:27:03 import
Igor Sysoev <igor@sysoev.ru>
parents:
diff
changeset
|
12 #include <ngx_config.h> |
100
7ebc8b7fb816
nginx-0.0.1-2003-06-03-19:42:58 import
Igor Sysoev <igor@sysoev.ru>
parents:
59
diff
changeset
|
13 #include <ngx_core.h> |
7ebc8b7fb816
nginx-0.0.1-2003-06-03-19:42:58 import
Igor Sysoev <igor@sysoev.ru>
parents:
59
diff
changeset
|
14 |
2
ffffe1499bce
nginx-0.0.1-2002-08-16-19:27:03 import
Igor Sysoev <igor@sysoev.ru>
parents:
diff
changeset
|
15 |
13
2aba961a1d34
nginx-0.0.1-2002-09-16-19:01:44 import
Igor Sysoev <igor@sysoev.ru>
parents:
8
diff
changeset
|
16 #define NGX_WRITE_SHUTDOWN SD_SEND |
2aba961a1d34
nginx-0.0.1-2002-09-16-19:01:44 import
Igor Sysoev <igor@sysoev.ru>
parents:
8
diff
changeset
|
17 |
8
708f8bb772ec
nginx-0.0.1-2002-09-02-18:48:24 import
Igor Sysoev <igor@sysoev.ru>
parents:
6
diff
changeset
|
18 |
3
34a521b1a148
nginx-0.0.1-2002-08-20-18:48:28 import
Igor Sysoev <igor@sysoev.ru>
parents:
2
diff
changeset
|
19 typedef SOCKET ngx_socket_t; |
8
708f8bb772ec
nginx-0.0.1-2002-09-02-18:48:24 import
Igor Sysoev <igor@sysoev.ru>
parents:
6
diff
changeset
|
20 typedef int socklen_t; |
2
ffffe1499bce
nginx-0.0.1-2002-08-16-19:27:03 import
Igor Sysoev <igor@sysoev.ru>
parents:
diff
changeset
|
21 |
ffffe1499bce
nginx-0.0.1-2002-08-16-19:27:03 import
Igor Sysoev <igor@sysoev.ru>
parents:
diff
changeset
|
22 |
1633
74b2a52bc3c9
TransmitPackets(), ConnectEx(), and DisconnectEx()
Igor Sysoev <igor@sysoev.ru>
parents:
501
diff
changeset
|
23 #define ngx_socket(af, type, proto) \ |
6230
2a621245f4cf
Win32: MSVC 2015 compatibility.
Maxim Dounin <mdounin@mdounin.ru>
parents:
4412
diff
changeset
|
24 WSASocketW(af, type, proto, NULL, 0, WSA_FLAG_OVERLAPPED) |
103
6dfda4cf5200
nginx-0.0.1-2003-06-11-19:28:34 import
Igor Sysoev <igor@sysoev.ru>
parents:
100
diff
changeset
|
25 |
6230
2a621245f4cf
Win32: MSVC 2015 compatibility.
Maxim Dounin <mdounin@mdounin.ru>
parents:
4412
diff
changeset
|
26 #define ngx_socket_n "WSASocketW()" |
6
669801705ab1
nginx-0.0.1-2002-08-26-19:18:19 import
Igor Sysoev <igor@sysoev.ru>
parents:
3
diff
changeset
|
27 |
8
708f8bb772ec
nginx-0.0.1-2002-09-02-18:48:24 import
Igor Sysoev <igor@sysoev.ru>
parents:
6
diff
changeset
|
28 int ngx_nonblocking(ngx_socket_t s); |
59
e8cdc2989cee
nginx-0.0.1-2003-02-06-20:21:13 import
Igor Sysoev <igor@sysoev.ru>
parents:
13
diff
changeset
|
29 int ngx_blocking(ngx_socket_t s); |
e8cdc2989cee
nginx-0.0.1-2003-02-06-20:21:13 import
Igor Sysoev <igor@sysoev.ru>
parents:
13
diff
changeset
|
30 |
6
669801705ab1
nginx-0.0.1-2002-08-26-19:18:19 import
Igor Sysoev <igor@sysoev.ru>
parents:
3
diff
changeset
|
31 #define ngx_nonblocking_n "ioctlsocket(FIONBIO)" |
59
e8cdc2989cee
nginx-0.0.1-2003-02-06-20:21:13 import
Igor Sysoev <igor@sysoev.ru>
parents:
13
diff
changeset
|
32 #define ngx_blocking_n "ioctlsocket(!FIONBIO)" |
2
ffffe1499bce
nginx-0.0.1-2002-08-16-19:27:03 import
Igor Sysoev <igor@sysoev.ru>
parents:
diff
changeset
|
33 |
7583
efd71d49bde0
Events: available bytes calculation via ioctl(FIONREAD).
Maxim Dounin <mdounin@mdounin.ru>
parents:
7444
diff
changeset
|
34 int ngx_socket_nread(ngx_socket_t s, int *n); |
efd71d49bde0
Events: available bytes calculation via ioctl(FIONREAD).
Maxim Dounin <mdounin@mdounin.ru>
parents:
7444
diff
changeset
|
35 #define ngx_socket_nread_n "ioctlsocket(FIONREAD)" |
efd71d49bde0
Events: available bytes calculation via ioctl(FIONREAD).
Maxim Dounin <mdounin@mdounin.ru>
parents:
7444
diff
changeset
|
36 |
13
2aba961a1d34
nginx-0.0.1-2002-09-16-19:01:44 import
Igor Sysoev <igor@sysoev.ru>
parents:
8
diff
changeset
|
37 #define ngx_shutdown_socket shutdown |
2aba961a1d34
nginx-0.0.1-2002-09-16-19:01:44 import
Igor Sysoev <igor@sysoev.ru>
parents:
8
diff
changeset
|
38 #define ngx_shutdown_socket_n "shutdown()" |
2aba961a1d34
nginx-0.0.1-2002-09-16-19:01:44 import
Igor Sysoev <igor@sysoev.ru>
parents:
8
diff
changeset
|
39 |
3
34a521b1a148
nginx-0.0.1-2002-08-20-18:48:28 import
Igor Sysoev <igor@sysoev.ru>
parents:
2
diff
changeset
|
40 #define ngx_close_socket closesocket |
6
669801705ab1
nginx-0.0.1-2002-08-26-19:18:19 import
Igor Sysoev <igor@sysoev.ru>
parents:
3
diff
changeset
|
41 #define ngx_close_socket_n "closesocket()" |
2
ffffe1499bce
nginx-0.0.1-2002-08-16-19:27:03 import
Igor Sysoev <igor@sysoev.ru>
parents:
diff
changeset
|
42 |
ffffe1499bce
nginx-0.0.1-2002-08-16-19:27:03 import
Igor Sysoev <igor@sysoev.ru>
parents:
diff
changeset
|
43 |
282
30310107dbc9
nginx-0.0.2-2004-03-09-22:47:07 import
Igor Sysoev <igor@sysoev.ru>
parents:
186
diff
changeset
|
44 #ifndef WSAID_ACCEPTEX |
30310107dbc9
nginx-0.0.2-2004-03-09-22:47:07 import
Igor Sysoev <igor@sysoev.ru>
parents:
186
diff
changeset
|
45 |
30310107dbc9
nginx-0.0.2-2004-03-09-22:47:07 import
Igor Sysoev <igor@sysoev.ru>
parents:
186
diff
changeset
|
46 typedef BOOL (PASCAL FAR * LPFN_ACCEPTEX)( |
30310107dbc9
nginx-0.0.2-2004-03-09-22:47:07 import
Igor Sysoev <igor@sysoev.ru>
parents:
186
diff
changeset
|
47 IN SOCKET sListenSocket, |
30310107dbc9
nginx-0.0.2-2004-03-09-22:47:07 import
Igor Sysoev <igor@sysoev.ru>
parents:
186
diff
changeset
|
48 IN SOCKET sAcceptSocket, |
30310107dbc9
nginx-0.0.2-2004-03-09-22:47:07 import
Igor Sysoev <igor@sysoev.ru>
parents:
186
diff
changeset
|
49 IN PVOID lpOutputBuffer, |
30310107dbc9
nginx-0.0.2-2004-03-09-22:47:07 import
Igor Sysoev <igor@sysoev.ru>
parents:
186
diff
changeset
|
50 IN DWORD dwReceiveDataLength, |
30310107dbc9
nginx-0.0.2-2004-03-09-22:47:07 import
Igor Sysoev <igor@sysoev.ru>
parents:
186
diff
changeset
|
51 IN DWORD dwLocalAddressLength, |
30310107dbc9
nginx-0.0.2-2004-03-09-22:47:07 import
Igor Sysoev <igor@sysoev.ru>
parents:
186
diff
changeset
|
52 IN DWORD dwRemoteAddressLength, |
30310107dbc9
nginx-0.0.2-2004-03-09-22:47:07 import
Igor Sysoev <igor@sysoev.ru>
parents:
186
diff
changeset
|
53 OUT LPDWORD lpdwBytesReceived, |
30310107dbc9
nginx-0.0.2-2004-03-09-22:47:07 import
Igor Sysoev <igor@sysoev.ru>
parents:
186
diff
changeset
|
54 IN LPOVERLAPPED lpOverlapped |
30310107dbc9
nginx-0.0.2-2004-03-09-22:47:07 import
Igor Sysoev <igor@sysoev.ru>
parents:
186
diff
changeset
|
55 ); |
30310107dbc9
nginx-0.0.2-2004-03-09-22:47:07 import
Igor Sysoev <igor@sysoev.ru>
parents:
186
diff
changeset
|
56 |
1633
74b2a52bc3c9
TransmitPackets(), ConnectEx(), and DisconnectEx()
Igor Sysoev <igor@sysoev.ru>
parents:
501
diff
changeset
|
57 #define WSAID_ACCEPTEX \ |
74b2a52bc3c9
TransmitPackets(), ConnectEx(), and DisconnectEx()
Igor Sysoev <igor@sysoev.ru>
parents:
501
diff
changeset
|
58 {0xb5367df1,0xcbac,0x11cf,{0x95,0xca,0x00,0x80,0x5f,0x48,0xa1,0x92}} |
282
30310107dbc9
nginx-0.0.2-2004-03-09-22:47:07 import
Igor Sysoev <igor@sysoev.ru>
parents:
186
diff
changeset
|
59 |
30310107dbc9
nginx-0.0.2-2004-03-09-22:47:07 import
Igor Sysoev <igor@sysoev.ru>
parents:
186
diff
changeset
|
60 #endif |
30310107dbc9
nginx-0.0.2-2004-03-09-22:47:07 import
Igor Sysoev <igor@sysoev.ru>
parents:
186
diff
changeset
|
61 |
30310107dbc9
nginx-0.0.2-2004-03-09-22:47:07 import
Igor Sysoev <igor@sysoev.ru>
parents:
186
diff
changeset
|
62 |
30310107dbc9
nginx-0.0.2-2004-03-09-22:47:07 import
Igor Sysoev <igor@sysoev.ru>
parents:
186
diff
changeset
|
63 #ifndef WSAID_GETACCEPTEXSOCKADDRS |
30310107dbc9
nginx-0.0.2-2004-03-09-22:47:07 import
Igor Sysoev <igor@sysoev.ru>
parents:
186
diff
changeset
|
64 |
30310107dbc9
nginx-0.0.2-2004-03-09-22:47:07 import
Igor Sysoev <igor@sysoev.ru>
parents:
186
diff
changeset
|
65 typedef VOID (PASCAL FAR * LPFN_GETACCEPTEXSOCKADDRS)( |
30310107dbc9
nginx-0.0.2-2004-03-09-22:47:07 import
Igor Sysoev <igor@sysoev.ru>
parents:
186
diff
changeset
|
66 IN PVOID lpOutputBuffer, |
30310107dbc9
nginx-0.0.2-2004-03-09-22:47:07 import
Igor Sysoev <igor@sysoev.ru>
parents:
186
diff
changeset
|
67 IN DWORD dwReceiveDataLength, |
30310107dbc9
nginx-0.0.2-2004-03-09-22:47:07 import
Igor Sysoev <igor@sysoev.ru>
parents:
186
diff
changeset
|
68 IN DWORD dwLocalAddressLength, |
30310107dbc9
nginx-0.0.2-2004-03-09-22:47:07 import
Igor Sysoev <igor@sysoev.ru>
parents:
186
diff
changeset
|
69 IN DWORD dwRemoteAddressLength, |
30310107dbc9
nginx-0.0.2-2004-03-09-22:47:07 import
Igor Sysoev <igor@sysoev.ru>
parents:
186
diff
changeset
|
70 OUT struct sockaddr **LocalSockaddr, |
30310107dbc9
nginx-0.0.2-2004-03-09-22:47:07 import
Igor Sysoev <igor@sysoev.ru>
parents:
186
diff
changeset
|
71 OUT LPINT LocalSockaddrLength, |
30310107dbc9
nginx-0.0.2-2004-03-09-22:47:07 import
Igor Sysoev <igor@sysoev.ru>
parents:
186
diff
changeset
|
72 OUT struct sockaddr **RemoteSockaddr, |
30310107dbc9
nginx-0.0.2-2004-03-09-22:47:07 import
Igor Sysoev <igor@sysoev.ru>
parents:
186
diff
changeset
|
73 OUT LPINT RemoteSockaddrLength |
30310107dbc9
nginx-0.0.2-2004-03-09-22:47:07 import
Igor Sysoev <igor@sysoev.ru>
parents:
186
diff
changeset
|
74 ); |
30310107dbc9
nginx-0.0.2-2004-03-09-22:47:07 import
Igor Sysoev <igor@sysoev.ru>
parents:
186
diff
changeset
|
75 |
1633
74b2a52bc3c9
TransmitPackets(), ConnectEx(), and DisconnectEx()
Igor Sysoev <igor@sysoev.ru>
parents:
501
diff
changeset
|
76 #define WSAID_GETACCEPTEXSOCKADDRS \ |
282
30310107dbc9
nginx-0.0.2-2004-03-09-22:47:07 import
Igor Sysoev <igor@sysoev.ru>
parents:
186
diff
changeset
|
77 {0xb5367df2,0xcbac,0x11cf,{0x95,0xca,0x00,0x80,0x5f,0x48,0xa1,0x92}} |
30310107dbc9
nginx-0.0.2-2004-03-09-22:47:07 import
Igor Sysoev <igor@sysoev.ru>
parents:
186
diff
changeset
|
78 |
30310107dbc9
nginx-0.0.2-2004-03-09-22:47:07 import
Igor Sysoev <igor@sysoev.ru>
parents:
186
diff
changeset
|
79 #endif |
30310107dbc9
nginx-0.0.2-2004-03-09-22:47:07 import
Igor Sysoev <igor@sysoev.ru>
parents:
186
diff
changeset
|
80 |
30310107dbc9
nginx-0.0.2-2004-03-09-22:47:07 import
Igor Sysoev <igor@sysoev.ru>
parents:
186
diff
changeset
|
81 |
1633
74b2a52bc3c9
TransmitPackets(), ConnectEx(), and DisconnectEx()
Igor Sysoev <igor@sysoev.ru>
parents:
501
diff
changeset
|
82 #ifndef WSAID_TRANSMITFILE |
74b2a52bc3c9
TransmitPackets(), ConnectEx(), and DisconnectEx()
Igor Sysoev <igor@sysoev.ru>
parents:
501
diff
changeset
|
83 |
74b2a52bc3c9
TransmitPackets(), ConnectEx(), and DisconnectEx()
Igor Sysoev <igor@sysoev.ru>
parents:
501
diff
changeset
|
84 #ifndef TF_DISCONNECT |
74b2a52bc3c9
TransmitPackets(), ConnectEx(), and DisconnectEx()
Igor Sysoev <igor@sysoev.ru>
parents:
501
diff
changeset
|
85 |
74b2a52bc3c9
TransmitPackets(), ConnectEx(), and DisconnectEx()
Igor Sysoev <igor@sysoev.ru>
parents:
501
diff
changeset
|
86 #define TF_DISCONNECT 1 |
74b2a52bc3c9
TransmitPackets(), ConnectEx(), and DisconnectEx()
Igor Sysoev <igor@sysoev.ru>
parents:
501
diff
changeset
|
87 #define TF_REUSE_SOCKET 2 |
74b2a52bc3c9
TransmitPackets(), ConnectEx(), and DisconnectEx()
Igor Sysoev <igor@sysoev.ru>
parents:
501
diff
changeset
|
88 #define TF_WRITE_BEHIND 4 |
74b2a52bc3c9
TransmitPackets(), ConnectEx(), and DisconnectEx()
Igor Sysoev <igor@sysoev.ru>
parents:
501
diff
changeset
|
89 #define TF_USE_DEFAULT_WORKER 0 |
74b2a52bc3c9
TransmitPackets(), ConnectEx(), and DisconnectEx()
Igor Sysoev <igor@sysoev.ru>
parents:
501
diff
changeset
|
90 #define TF_USE_SYSTEM_THREAD 16 |
74b2a52bc3c9
TransmitPackets(), ConnectEx(), and DisconnectEx()
Igor Sysoev <igor@sysoev.ru>
parents:
501
diff
changeset
|
91 #define TF_USE_KERNEL_APC 32 |
74b2a52bc3c9
TransmitPackets(), ConnectEx(), and DisconnectEx()
Igor Sysoev <igor@sysoev.ru>
parents:
501
diff
changeset
|
92 |
74b2a52bc3c9
TransmitPackets(), ConnectEx(), and DisconnectEx()
Igor Sysoev <igor@sysoev.ru>
parents:
501
diff
changeset
|
93 typedef struct _TRANSMIT_FILE_BUFFERS { |
74b2a52bc3c9
TransmitPackets(), ConnectEx(), and DisconnectEx()
Igor Sysoev <igor@sysoev.ru>
parents:
501
diff
changeset
|
94 LPVOID Head; |
74b2a52bc3c9
TransmitPackets(), ConnectEx(), and DisconnectEx()
Igor Sysoev <igor@sysoev.ru>
parents:
501
diff
changeset
|
95 DWORD HeadLength; |
74b2a52bc3c9
TransmitPackets(), ConnectEx(), and DisconnectEx()
Igor Sysoev <igor@sysoev.ru>
parents:
501
diff
changeset
|
96 LPVOID Tail; |
74b2a52bc3c9
TransmitPackets(), ConnectEx(), and DisconnectEx()
Igor Sysoev <igor@sysoev.ru>
parents:
501
diff
changeset
|
97 DWORD TailLength; |
74b2a52bc3c9
TransmitPackets(), ConnectEx(), and DisconnectEx()
Igor Sysoev <igor@sysoev.ru>
parents:
501
diff
changeset
|
98 } TRANSMIT_FILE_BUFFERS, *PTRANSMIT_FILE_BUFFERS, FAR *LPTRANSMIT_FILE_BUFFERS; |
74b2a52bc3c9
TransmitPackets(), ConnectEx(), and DisconnectEx()
Igor Sysoev <igor@sysoev.ru>
parents:
501
diff
changeset
|
99 |
74b2a52bc3c9
TransmitPackets(), ConnectEx(), and DisconnectEx()
Igor Sysoev <igor@sysoev.ru>
parents:
501
diff
changeset
|
100 #endif |
282
30310107dbc9
nginx-0.0.2-2004-03-09-22:47:07 import
Igor Sysoev <igor@sysoev.ru>
parents:
186
diff
changeset
|
101 |
30310107dbc9
nginx-0.0.2-2004-03-09-22:47:07 import
Igor Sysoev <igor@sysoev.ru>
parents:
186
diff
changeset
|
102 typedef BOOL (PASCAL FAR * LPFN_TRANSMITFILE)( |
30310107dbc9
nginx-0.0.2-2004-03-09-22:47:07 import
Igor Sysoev <igor@sysoev.ru>
parents:
186
diff
changeset
|
103 IN SOCKET hSocket, |
30310107dbc9
nginx-0.0.2-2004-03-09-22:47:07 import
Igor Sysoev <igor@sysoev.ru>
parents:
186
diff
changeset
|
104 IN HANDLE hFile, |
30310107dbc9
nginx-0.0.2-2004-03-09-22:47:07 import
Igor Sysoev <igor@sysoev.ru>
parents:
186
diff
changeset
|
105 IN DWORD nNumberOfBytesToWrite, |
30310107dbc9
nginx-0.0.2-2004-03-09-22:47:07 import
Igor Sysoev <igor@sysoev.ru>
parents:
186
diff
changeset
|
106 IN DWORD nNumberOfBytesPerSend, |
30310107dbc9
nginx-0.0.2-2004-03-09-22:47:07 import
Igor Sysoev <igor@sysoev.ru>
parents:
186
diff
changeset
|
107 IN LPOVERLAPPED lpOverlapped, |
30310107dbc9
nginx-0.0.2-2004-03-09-22:47:07 import
Igor Sysoev <igor@sysoev.ru>
parents:
186
diff
changeset
|
108 IN LPTRANSMIT_FILE_BUFFERS lpTransmitBuffers, |
30310107dbc9
nginx-0.0.2-2004-03-09-22:47:07 import
Igor Sysoev <igor@sysoev.ru>
parents:
186
diff
changeset
|
109 IN DWORD dwReserved |
30310107dbc9
nginx-0.0.2-2004-03-09-22:47:07 import
Igor Sysoev <igor@sysoev.ru>
parents:
186
diff
changeset
|
110 ); |
30310107dbc9
nginx-0.0.2-2004-03-09-22:47:07 import
Igor Sysoev <igor@sysoev.ru>
parents:
186
diff
changeset
|
111 |
1633
74b2a52bc3c9
TransmitPackets(), ConnectEx(), and DisconnectEx()
Igor Sysoev <igor@sysoev.ru>
parents:
501
diff
changeset
|
112 #define WSAID_TRANSMITFILE \ |
74b2a52bc3c9
TransmitPackets(), ConnectEx(), and DisconnectEx()
Igor Sysoev <igor@sysoev.ru>
parents:
501
diff
changeset
|
113 {0xb5367df0,0xcbac,0x11cf,{0x95,0xca,0x00,0x80,0x5f,0x48,0xa1,0x92}} |
282
30310107dbc9
nginx-0.0.2-2004-03-09-22:47:07 import
Igor Sysoev <igor@sysoev.ru>
parents:
186
diff
changeset
|
114 |
30310107dbc9
nginx-0.0.2-2004-03-09-22:47:07 import
Igor Sysoev <igor@sysoev.ru>
parents:
186
diff
changeset
|
115 #endif |
30310107dbc9
nginx-0.0.2-2004-03-09-22:47:07 import
Igor Sysoev <igor@sysoev.ru>
parents:
186
diff
changeset
|
116 |
30310107dbc9
nginx-0.0.2-2004-03-09-22:47:07 import
Igor Sysoev <igor@sysoev.ru>
parents:
186
diff
changeset
|
117 |
1633
74b2a52bc3c9
TransmitPackets(), ConnectEx(), and DisconnectEx()
Igor Sysoev <igor@sysoev.ru>
parents:
501
diff
changeset
|
118 #ifndef WSAID_TRANSMITPACKETS |
74b2a52bc3c9
TransmitPackets(), ConnectEx(), and DisconnectEx()
Igor Sysoev <igor@sysoev.ru>
parents:
501
diff
changeset
|
119 |
74b2a52bc3c9
TransmitPackets(), ConnectEx(), and DisconnectEx()
Igor Sysoev <igor@sysoev.ru>
parents:
501
diff
changeset
|
120 /* OpenWatcom has a swapped TP_ELEMENT_FILE and TP_ELEMENT_MEMORY definition */ |
74b2a52bc3c9
TransmitPackets(), ConnectEx(), and DisconnectEx()
Igor Sysoev <igor@sysoev.ru>
parents:
501
diff
changeset
|
121 |
74b2a52bc3c9
TransmitPackets(), ConnectEx(), and DisconnectEx()
Igor Sysoev <igor@sysoev.ru>
parents:
501
diff
changeset
|
122 #ifndef TP_ELEMENT_FILE |
74b2a52bc3c9
TransmitPackets(), ConnectEx(), and DisconnectEx()
Igor Sysoev <igor@sysoev.ru>
parents:
501
diff
changeset
|
123 |
74b2a52bc3c9
TransmitPackets(), ConnectEx(), and DisconnectEx()
Igor Sysoev <igor@sysoev.ru>
parents:
501
diff
changeset
|
124 #ifdef _MSC_VER |
74b2a52bc3c9
TransmitPackets(), ConnectEx(), and DisconnectEx()
Igor Sysoev <igor@sysoev.ru>
parents:
501
diff
changeset
|
125 #pragma warning(disable:4201) /* Nonstandard extension, nameless struct/union */ |
74b2a52bc3c9
TransmitPackets(), ConnectEx(), and DisconnectEx()
Igor Sysoev <igor@sysoev.ru>
parents:
501
diff
changeset
|
126 #endif |
74b2a52bc3c9
TransmitPackets(), ConnectEx(), and DisconnectEx()
Igor Sysoev <igor@sysoev.ru>
parents:
501
diff
changeset
|
127 |
1679
ca317d9b5c09
style fix: remove trailing spaces
Igor Sysoev <igor@sysoev.ru>
parents:
1633
diff
changeset
|
128 typedef struct _TRANSMIT_PACKETS_ELEMENT { |
ca317d9b5c09
style fix: remove trailing spaces
Igor Sysoev <igor@sysoev.ru>
parents:
1633
diff
changeset
|
129 ULONG dwElFlags; |
1633
74b2a52bc3c9
TransmitPackets(), ConnectEx(), and DisconnectEx()
Igor Sysoev <igor@sysoev.ru>
parents:
501
diff
changeset
|
130 #define TP_ELEMENT_MEMORY 1 |
74b2a52bc3c9
TransmitPackets(), ConnectEx(), and DisconnectEx()
Igor Sysoev <igor@sysoev.ru>
parents:
501
diff
changeset
|
131 #define TP_ELEMENT_FILE 2 |
74b2a52bc3c9
TransmitPackets(), ConnectEx(), and DisconnectEx()
Igor Sysoev <igor@sysoev.ru>
parents:
501
diff
changeset
|
132 #define TP_ELEMENT_EOP 4 |
1679
ca317d9b5c09
style fix: remove trailing spaces
Igor Sysoev <igor@sysoev.ru>
parents:
1633
diff
changeset
|
133 ULONG cLength; |
1633
74b2a52bc3c9
TransmitPackets(), ConnectEx(), and DisconnectEx()
Igor Sysoev <igor@sysoev.ru>
parents:
501
diff
changeset
|
134 union { |
74b2a52bc3c9
TransmitPackets(), ConnectEx(), and DisconnectEx()
Igor Sysoev <igor@sysoev.ru>
parents:
501
diff
changeset
|
135 struct { |
74b2a52bc3c9
TransmitPackets(), ConnectEx(), and DisconnectEx()
Igor Sysoev <igor@sysoev.ru>
parents:
501
diff
changeset
|
136 LARGE_INTEGER nFileOffset; |
74b2a52bc3c9
TransmitPackets(), ConnectEx(), and DisconnectEx()
Igor Sysoev <igor@sysoev.ru>
parents:
501
diff
changeset
|
137 HANDLE hFile; |
74b2a52bc3c9
TransmitPackets(), ConnectEx(), and DisconnectEx()
Igor Sysoev <igor@sysoev.ru>
parents:
501
diff
changeset
|
138 }; |
74b2a52bc3c9
TransmitPackets(), ConnectEx(), and DisconnectEx()
Igor Sysoev <igor@sysoev.ru>
parents:
501
diff
changeset
|
139 PVOID pBuffer; |
74b2a52bc3c9
TransmitPackets(), ConnectEx(), and DisconnectEx()
Igor Sysoev <igor@sysoev.ru>
parents:
501
diff
changeset
|
140 }; |
74b2a52bc3c9
TransmitPackets(), ConnectEx(), and DisconnectEx()
Igor Sysoev <igor@sysoev.ru>
parents:
501
diff
changeset
|
141 } TRANSMIT_PACKETS_ELEMENT, *PTRANSMIT_PACKETS_ELEMENT, |
74b2a52bc3c9
TransmitPackets(), ConnectEx(), and DisconnectEx()
Igor Sysoev <igor@sysoev.ru>
parents:
501
diff
changeset
|
142 FAR *LPTRANSMIT_PACKETS_ELEMENT; |
74b2a52bc3c9
TransmitPackets(), ConnectEx(), and DisconnectEx()
Igor Sysoev <igor@sysoev.ru>
parents:
501
diff
changeset
|
143 |
74b2a52bc3c9
TransmitPackets(), ConnectEx(), and DisconnectEx()
Igor Sysoev <igor@sysoev.ru>
parents:
501
diff
changeset
|
144 #ifdef _MSC_VER |
74b2a52bc3c9
TransmitPackets(), ConnectEx(), and DisconnectEx()
Igor Sysoev <igor@sysoev.ru>
parents:
501
diff
changeset
|
145 #pragma warning(default:4201) |
74b2a52bc3c9
TransmitPackets(), ConnectEx(), and DisconnectEx()
Igor Sysoev <igor@sysoev.ru>
parents:
501
diff
changeset
|
146 #endif |
74b2a52bc3c9
TransmitPackets(), ConnectEx(), and DisconnectEx()
Igor Sysoev <igor@sysoev.ru>
parents:
501
diff
changeset
|
147 |
74b2a52bc3c9
TransmitPackets(), ConnectEx(), and DisconnectEx()
Igor Sysoev <igor@sysoev.ru>
parents:
501
diff
changeset
|
148 #endif |
74b2a52bc3c9
TransmitPackets(), ConnectEx(), and DisconnectEx()
Igor Sysoev <igor@sysoev.ru>
parents:
501
diff
changeset
|
149 |
74b2a52bc3c9
TransmitPackets(), ConnectEx(), and DisconnectEx()
Igor Sysoev <igor@sysoev.ru>
parents:
501
diff
changeset
|
150 typedef BOOL (PASCAL FAR * LPFN_TRANSMITPACKETS) ( |
1679
ca317d9b5c09
style fix: remove trailing spaces
Igor Sysoev <igor@sysoev.ru>
parents:
1633
diff
changeset
|
151 SOCKET hSocket, |
ca317d9b5c09
style fix: remove trailing spaces
Igor Sysoev <igor@sysoev.ru>
parents:
1633
diff
changeset
|
152 TRANSMIT_PACKETS_ELEMENT *lpPacketArray, |
ca317d9b5c09
style fix: remove trailing spaces
Igor Sysoev <igor@sysoev.ru>
parents:
1633
diff
changeset
|
153 DWORD nElementCount, |
ca317d9b5c09
style fix: remove trailing spaces
Igor Sysoev <igor@sysoev.ru>
parents:
1633
diff
changeset
|
154 DWORD nSendSize, |
ca317d9b5c09
style fix: remove trailing spaces
Igor Sysoev <igor@sysoev.ru>
parents:
1633
diff
changeset
|
155 LPOVERLAPPED lpOverlapped, |
ca317d9b5c09
style fix: remove trailing spaces
Igor Sysoev <igor@sysoev.ru>
parents:
1633
diff
changeset
|
156 DWORD dwFlags |
1633
74b2a52bc3c9
TransmitPackets(), ConnectEx(), and DisconnectEx()
Igor Sysoev <igor@sysoev.ru>
parents:
501
diff
changeset
|
157 ); |
74b2a52bc3c9
TransmitPackets(), ConnectEx(), and DisconnectEx()
Igor Sysoev <igor@sysoev.ru>
parents:
501
diff
changeset
|
158 |
74b2a52bc3c9
TransmitPackets(), ConnectEx(), and DisconnectEx()
Igor Sysoev <igor@sysoev.ru>
parents:
501
diff
changeset
|
159 #define WSAID_TRANSMITPACKETS \ |
74b2a52bc3c9
TransmitPackets(), ConnectEx(), and DisconnectEx()
Igor Sysoev <igor@sysoev.ru>
parents:
501
diff
changeset
|
160 {0xd9689da0,0x1f90,0x11d3,{0x99,0x71,0x00,0xc0,0x4f,0x68,0xc8,0x76}} |
74b2a52bc3c9
TransmitPackets(), ConnectEx(), and DisconnectEx()
Igor Sysoev <igor@sysoev.ru>
parents:
501
diff
changeset
|
161 |
74b2a52bc3c9
TransmitPackets(), ConnectEx(), and DisconnectEx()
Igor Sysoev <igor@sysoev.ru>
parents:
501
diff
changeset
|
162 #endif |
74b2a52bc3c9
TransmitPackets(), ConnectEx(), and DisconnectEx()
Igor Sysoev <igor@sysoev.ru>
parents:
501
diff
changeset
|
163 |
74b2a52bc3c9
TransmitPackets(), ConnectEx(), and DisconnectEx()
Igor Sysoev <igor@sysoev.ru>
parents:
501
diff
changeset
|
164 |
74b2a52bc3c9
TransmitPackets(), ConnectEx(), and DisconnectEx()
Igor Sysoev <igor@sysoev.ru>
parents:
501
diff
changeset
|
165 #ifndef WSAID_CONNECTEX |
74b2a52bc3c9
TransmitPackets(), ConnectEx(), and DisconnectEx()
Igor Sysoev <igor@sysoev.ru>
parents:
501
diff
changeset
|
166 |
74b2a52bc3c9
TransmitPackets(), ConnectEx(), and DisconnectEx()
Igor Sysoev <igor@sysoev.ru>
parents:
501
diff
changeset
|
167 typedef BOOL (PASCAL FAR * LPFN_CONNECTEX) ( |
74b2a52bc3c9
TransmitPackets(), ConnectEx(), and DisconnectEx()
Igor Sysoev <igor@sysoev.ru>
parents:
501
diff
changeset
|
168 IN SOCKET s, |
74b2a52bc3c9
TransmitPackets(), ConnectEx(), and DisconnectEx()
Igor Sysoev <igor@sysoev.ru>
parents:
501
diff
changeset
|
169 IN const struct sockaddr FAR *name, |
74b2a52bc3c9
TransmitPackets(), ConnectEx(), and DisconnectEx()
Igor Sysoev <igor@sysoev.ru>
parents:
501
diff
changeset
|
170 IN int namelen, |
74b2a52bc3c9
TransmitPackets(), ConnectEx(), and DisconnectEx()
Igor Sysoev <igor@sysoev.ru>
parents:
501
diff
changeset
|
171 IN PVOID lpSendBuffer OPTIONAL, |
74b2a52bc3c9
TransmitPackets(), ConnectEx(), and DisconnectEx()
Igor Sysoev <igor@sysoev.ru>
parents:
501
diff
changeset
|
172 IN DWORD dwSendDataLength, |
74b2a52bc3c9
TransmitPackets(), ConnectEx(), and DisconnectEx()
Igor Sysoev <igor@sysoev.ru>
parents:
501
diff
changeset
|
173 OUT LPDWORD lpdwBytesSent, |
74b2a52bc3c9
TransmitPackets(), ConnectEx(), and DisconnectEx()
Igor Sysoev <igor@sysoev.ru>
parents:
501
diff
changeset
|
174 IN LPOVERLAPPED lpOverlapped |
74b2a52bc3c9
TransmitPackets(), ConnectEx(), and DisconnectEx()
Igor Sysoev <igor@sysoev.ru>
parents:
501
diff
changeset
|
175 ); |
74b2a52bc3c9
TransmitPackets(), ConnectEx(), and DisconnectEx()
Igor Sysoev <igor@sysoev.ru>
parents:
501
diff
changeset
|
176 |
74b2a52bc3c9
TransmitPackets(), ConnectEx(), and DisconnectEx()
Igor Sysoev <igor@sysoev.ru>
parents:
501
diff
changeset
|
177 #define WSAID_CONNECTEX \ |
74b2a52bc3c9
TransmitPackets(), ConnectEx(), and DisconnectEx()
Igor Sysoev <igor@sysoev.ru>
parents:
501
diff
changeset
|
178 {0x25a207b9,0xddf3,0x4660,{0x8e,0xe9,0x76,0xe5,0x8c,0x74,0x06,0x3e}} |
74b2a52bc3c9
TransmitPackets(), ConnectEx(), and DisconnectEx()
Igor Sysoev <igor@sysoev.ru>
parents:
501
diff
changeset
|
179 |
74b2a52bc3c9
TransmitPackets(), ConnectEx(), and DisconnectEx()
Igor Sysoev <igor@sysoev.ru>
parents:
501
diff
changeset
|
180 #endif |
74b2a52bc3c9
TransmitPackets(), ConnectEx(), and DisconnectEx()
Igor Sysoev <igor@sysoev.ru>
parents:
501
diff
changeset
|
181 |
74b2a52bc3c9
TransmitPackets(), ConnectEx(), and DisconnectEx()
Igor Sysoev <igor@sysoev.ru>
parents:
501
diff
changeset
|
182 |
74b2a52bc3c9
TransmitPackets(), ConnectEx(), and DisconnectEx()
Igor Sysoev <igor@sysoev.ru>
parents:
501
diff
changeset
|
183 #ifndef WSAID_DISCONNECTEX |
74b2a52bc3c9
TransmitPackets(), ConnectEx(), and DisconnectEx()
Igor Sysoev <igor@sysoev.ru>
parents:
501
diff
changeset
|
184 |
74b2a52bc3c9
TransmitPackets(), ConnectEx(), and DisconnectEx()
Igor Sysoev <igor@sysoev.ru>
parents:
501
diff
changeset
|
185 typedef BOOL (PASCAL FAR * LPFN_DISCONNECTEX) ( |
74b2a52bc3c9
TransmitPackets(), ConnectEx(), and DisconnectEx()
Igor Sysoev <igor@sysoev.ru>
parents:
501
diff
changeset
|
186 IN SOCKET s, |
74b2a52bc3c9
TransmitPackets(), ConnectEx(), and DisconnectEx()
Igor Sysoev <igor@sysoev.ru>
parents:
501
diff
changeset
|
187 IN LPOVERLAPPED lpOverlapped, |
74b2a52bc3c9
TransmitPackets(), ConnectEx(), and DisconnectEx()
Igor Sysoev <igor@sysoev.ru>
parents:
501
diff
changeset
|
188 IN DWORD dwFlags, |
74b2a52bc3c9
TransmitPackets(), ConnectEx(), and DisconnectEx()
Igor Sysoev <igor@sysoev.ru>
parents:
501
diff
changeset
|
189 IN DWORD dwReserved |
74b2a52bc3c9
TransmitPackets(), ConnectEx(), and DisconnectEx()
Igor Sysoev <igor@sysoev.ru>
parents:
501
diff
changeset
|
190 ); |
74b2a52bc3c9
TransmitPackets(), ConnectEx(), and DisconnectEx()
Igor Sysoev <igor@sysoev.ru>
parents:
501
diff
changeset
|
191 |
74b2a52bc3c9
TransmitPackets(), ConnectEx(), and DisconnectEx()
Igor Sysoev <igor@sysoev.ru>
parents:
501
diff
changeset
|
192 #define WSAID_DISCONNECTEX \ |
74b2a52bc3c9
TransmitPackets(), ConnectEx(), and DisconnectEx()
Igor Sysoev <igor@sysoev.ru>
parents:
501
diff
changeset
|
193 {0x7fda2e11,0x8630,0x436f,{0xa0,0x31,0xf5,0x36,0xa6,0xee,0xc1,0x57}} |
74b2a52bc3c9
TransmitPackets(), ConnectEx(), and DisconnectEx()
Igor Sysoev <igor@sysoev.ru>
parents:
501
diff
changeset
|
194 |
74b2a52bc3c9
TransmitPackets(), ConnectEx(), and DisconnectEx()
Igor Sysoev <igor@sysoev.ru>
parents:
501
diff
changeset
|
195 #endif |
74b2a52bc3c9
TransmitPackets(), ConnectEx(), and DisconnectEx()
Igor Sysoev <igor@sysoev.ru>
parents:
501
diff
changeset
|
196 |
74b2a52bc3c9
TransmitPackets(), ConnectEx(), and DisconnectEx()
Igor Sysoev <igor@sysoev.ru>
parents:
501
diff
changeset
|
197 |
74b2a52bc3c9
TransmitPackets(), ConnectEx(), and DisconnectEx()
Igor Sysoev <igor@sysoev.ru>
parents:
501
diff
changeset
|
198 extern LPFN_ACCEPTEX ngx_acceptex; |
74b2a52bc3c9
TransmitPackets(), ConnectEx(), and DisconnectEx()
Igor Sysoev <igor@sysoev.ru>
parents:
501
diff
changeset
|
199 extern LPFN_GETACCEPTEXSOCKADDRS ngx_getacceptexsockaddrs; |
74b2a52bc3c9
TransmitPackets(), ConnectEx(), and DisconnectEx()
Igor Sysoev <igor@sysoev.ru>
parents:
501
diff
changeset
|
200 extern LPFN_TRANSMITFILE ngx_transmitfile; |
74b2a52bc3c9
TransmitPackets(), ConnectEx(), and DisconnectEx()
Igor Sysoev <igor@sysoev.ru>
parents:
501
diff
changeset
|
201 extern LPFN_TRANSMITPACKETS ngx_transmitpackets; |
74b2a52bc3c9
TransmitPackets(), ConnectEx(), and DisconnectEx()
Igor Sysoev <igor@sysoev.ru>
parents:
501
diff
changeset
|
202 extern LPFN_CONNECTEX ngx_connectex; |
74b2a52bc3c9
TransmitPackets(), ConnectEx(), and DisconnectEx()
Igor Sysoev <igor@sysoev.ru>
parents:
501
diff
changeset
|
203 extern LPFN_DISCONNECTEX ngx_disconnectex; |
59
e8cdc2989cee
nginx-0.0.1-2003-02-06-20:21:13 import
Igor Sysoev <igor@sysoev.ru>
parents:
13
diff
changeset
|
204 |
8
708f8bb772ec
nginx-0.0.1-2002-09-02-18:48:24 import
Igor Sysoev <igor@sysoev.ru>
parents:
6
diff
changeset
|
205 |
7444
4089b3d2cb59
Win32: added WSAPoll() support.
Maxim Dounin <mdounin@mdounin.ru>
parents:
6230
diff
changeset
|
206 #if (NGX_HAVE_POLL && !defined POLLIN) |
4089b3d2cb59
Win32: added WSAPoll() support.
Maxim Dounin <mdounin@mdounin.ru>
parents:
6230
diff
changeset
|
207 |
4089b3d2cb59
Win32: added WSAPoll() support.
Maxim Dounin <mdounin@mdounin.ru>
parents:
6230
diff
changeset
|
208 /* |
4089b3d2cb59
Win32: added WSAPoll() support.
Maxim Dounin <mdounin@mdounin.ru>
parents:
6230
diff
changeset
|
209 * WSAPoll() is only available if _WIN32_WINNT >= 0x0600. |
4089b3d2cb59
Win32: added WSAPoll() support.
Maxim Dounin <mdounin@mdounin.ru>
parents:
6230
diff
changeset
|
210 * If it is not available during compilation, we try to |
4089b3d2cb59
Win32: added WSAPoll() support.
Maxim Dounin <mdounin@mdounin.ru>
parents:
6230
diff
changeset
|
211 * load it dynamically at runtime. |
4089b3d2cb59
Win32: added WSAPoll() support.
Maxim Dounin <mdounin@mdounin.ru>
parents:
6230
diff
changeset
|
212 */ |
4089b3d2cb59
Win32: added WSAPoll() support.
Maxim Dounin <mdounin@mdounin.ru>
parents:
6230
diff
changeset
|
213 |
4089b3d2cb59
Win32: added WSAPoll() support.
Maxim Dounin <mdounin@mdounin.ru>
parents:
6230
diff
changeset
|
214 #define NGX_LOAD_WSAPOLL 1 |
4089b3d2cb59
Win32: added WSAPoll() support.
Maxim Dounin <mdounin@mdounin.ru>
parents:
6230
diff
changeset
|
215 |
4089b3d2cb59
Win32: added WSAPoll() support.
Maxim Dounin <mdounin@mdounin.ru>
parents:
6230
diff
changeset
|
216 #define POLLRDNORM 0x0100 |
4089b3d2cb59
Win32: added WSAPoll() support.
Maxim Dounin <mdounin@mdounin.ru>
parents:
6230
diff
changeset
|
217 #define POLLRDBAND 0x0200 |
4089b3d2cb59
Win32: added WSAPoll() support.
Maxim Dounin <mdounin@mdounin.ru>
parents:
6230
diff
changeset
|
218 #define POLLIN (POLLRDNORM | POLLRDBAND) |
4089b3d2cb59
Win32: added WSAPoll() support.
Maxim Dounin <mdounin@mdounin.ru>
parents:
6230
diff
changeset
|
219 #define POLLPRI 0x0400 |
4089b3d2cb59
Win32: added WSAPoll() support.
Maxim Dounin <mdounin@mdounin.ru>
parents:
6230
diff
changeset
|
220 |
4089b3d2cb59
Win32: added WSAPoll() support.
Maxim Dounin <mdounin@mdounin.ru>
parents:
6230
diff
changeset
|
221 #define POLLWRNORM 0x0010 |
4089b3d2cb59
Win32: added WSAPoll() support.
Maxim Dounin <mdounin@mdounin.ru>
parents:
6230
diff
changeset
|
222 #define POLLOUT (POLLWRNORM) |
4089b3d2cb59
Win32: added WSAPoll() support.
Maxim Dounin <mdounin@mdounin.ru>
parents:
6230
diff
changeset
|
223 #define POLLWRBAND 0x0020 |
4089b3d2cb59
Win32: added WSAPoll() support.
Maxim Dounin <mdounin@mdounin.ru>
parents:
6230
diff
changeset
|
224 |
4089b3d2cb59
Win32: added WSAPoll() support.
Maxim Dounin <mdounin@mdounin.ru>
parents:
6230
diff
changeset
|
225 #define POLLERR 0x0001 |
4089b3d2cb59
Win32: added WSAPoll() support.
Maxim Dounin <mdounin@mdounin.ru>
parents:
6230
diff
changeset
|
226 #define POLLHUP 0x0002 |
4089b3d2cb59
Win32: added WSAPoll() support.
Maxim Dounin <mdounin@mdounin.ru>
parents:
6230
diff
changeset
|
227 #define POLLNVAL 0x0004 |
4089b3d2cb59
Win32: added WSAPoll() support.
Maxim Dounin <mdounin@mdounin.ru>
parents:
6230
diff
changeset
|
228 |
4089b3d2cb59
Win32: added WSAPoll() support.
Maxim Dounin <mdounin@mdounin.ru>
parents:
6230
diff
changeset
|
229 typedef struct pollfd { |
4089b3d2cb59
Win32: added WSAPoll() support.
Maxim Dounin <mdounin@mdounin.ru>
parents:
6230
diff
changeset
|
230 |
4089b3d2cb59
Win32: added WSAPoll() support.
Maxim Dounin <mdounin@mdounin.ru>
parents:
6230
diff
changeset
|
231 SOCKET fd; |
4089b3d2cb59
Win32: added WSAPoll() support.
Maxim Dounin <mdounin@mdounin.ru>
parents:
6230
diff
changeset
|
232 SHORT events; |
4089b3d2cb59
Win32: added WSAPoll() support.
Maxim Dounin <mdounin@mdounin.ru>
parents:
6230
diff
changeset
|
233 SHORT revents; |
4089b3d2cb59
Win32: added WSAPoll() support.
Maxim Dounin <mdounin@mdounin.ru>
parents:
6230
diff
changeset
|
234 |
4089b3d2cb59
Win32: added WSAPoll() support.
Maxim Dounin <mdounin@mdounin.ru>
parents:
6230
diff
changeset
|
235 } WSAPOLLFD, *PWSAPOLLFD, FAR *LPWSAPOLLFD; |
4089b3d2cb59
Win32: added WSAPoll() support.
Maxim Dounin <mdounin@mdounin.ru>
parents:
6230
diff
changeset
|
236 |
4089b3d2cb59
Win32: added WSAPoll() support.
Maxim Dounin <mdounin@mdounin.ru>
parents:
6230
diff
changeset
|
237 typedef int (WSAAPI *ngx_wsapoll_pt)( |
4089b3d2cb59
Win32: added WSAPoll() support.
Maxim Dounin <mdounin@mdounin.ru>
parents:
6230
diff
changeset
|
238 LPWSAPOLLFD fdArray, |
4089b3d2cb59
Win32: added WSAPoll() support.
Maxim Dounin <mdounin@mdounin.ru>
parents:
6230
diff
changeset
|
239 ULONG fds, |
4089b3d2cb59
Win32: added WSAPoll() support.
Maxim Dounin <mdounin@mdounin.ru>
parents:
6230
diff
changeset
|
240 INT timeout |
4089b3d2cb59
Win32: added WSAPoll() support.
Maxim Dounin <mdounin@mdounin.ru>
parents:
6230
diff
changeset
|
241 ); |
4089b3d2cb59
Win32: added WSAPoll() support.
Maxim Dounin <mdounin@mdounin.ru>
parents:
6230
diff
changeset
|
242 |
4089b3d2cb59
Win32: added WSAPoll() support.
Maxim Dounin <mdounin@mdounin.ru>
parents:
6230
diff
changeset
|
243 extern ngx_wsapoll_pt WSAPoll; |
4089b3d2cb59
Win32: added WSAPoll() support.
Maxim Dounin <mdounin@mdounin.ru>
parents:
6230
diff
changeset
|
244 extern ngx_uint_t ngx_have_wsapoll; |
4089b3d2cb59
Win32: added WSAPoll() support.
Maxim Dounin <mdounin@mdounin.ru>
parents:
6230
diff
changeset
|
245 |
4089b3d2cb59
Win32: added WSAPoll() support.
Maxim Dounin <mdounin@mdounin.ru>
parents:
6230
diff
changeset
|
246 #endif |
4089b3d2cb59
Win32: added WSAPoll() support.
Maxim Dounin <mdounin@mdounin.ru>
parents:
6230
diff
changeset
|
247 |
4089b3d2cb59
Win32: added WSAPoll() support.
Maxim Dounin <mdounin@mdounin.ru>
parents:
6230
diff
changeset
|
248 |
501 | 249 int ngx_tcp_push(ngx_socket_t s); |
1633
74b2a52bc3c9
TransmitPackets(), ConnectEx(), and DisconnectEx()
Igor Sysoev <igor@sysoev.ru>
parents:
501
diff
changeset
|
250 #define ngx_tcp_push_n "tcp_push()" |
103
6dfda4cf5200
nginx-0.0.1-2003-06-11-19:28:34 import
Igor Sysoev <igor@sysoev.ru>
parents:
100
diff
changeset
|
251 |
6dfda4cf5200
nginx-0.0.1-2003-06-11-19:28:34 import
Igor Sysoev <igor@sysoev.ru>
parents:
100
diff
changeset
|
252 |
2
ffffe1499bce
nginx-0.0.1-2002-08-16-19:27:03 import
Igor Sysoev <igor@sysoev.ru>
parents:
diff
changeset
|
253 #endif /* _NGX_SOCKET_H_INCLUDED_ */ |