Mercurial > hg > nginx
annotate src/os/win32/ngx_socket.h @ 9291:ee3eb2b9705f release-1.27.1
freenginx-1.27.1-RELEASE
author | Maxim Dounin <mdounin@mdounin.ru> |
---|---|
date | Tue, 04 Jun 2024 16:55:53 +0300 |
parents | 96bdda15413a |
children |
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 |
9042
96bdda15413a
Added shutdown macros for win32 required for QUIC.
Sergey Kandaurov <pluknet@nginx.com>
parents:
7583
diff
changeset
|
17 #define NGX_READ_SHUTDOWN SD_RECEIVE |
96bdda15413a
Added shutdown macros for win32 required for QUIC.
Sergey Kandaurov <pluknet@nginx.com>
parents:
7583
diff
changeset
|
18 #define NGX_RDWR_SHUTDOWN SD_BOTH |
13
2aba961a1d34
nginx-0.0.1-2002-09-16-19:01:44 import
Igor Sysoev <igor@sysoev.ru>
parents:
8
diff
changeset
|
19 |
8
708f8bb772ec
nginx-0.0.1-2002-09-02-18:48:24 import
Igor Sysoev <igor@sysoev.ru>
parents:
6
diff
changeset
|
20 |
3
34a521b1a148
nginx-0.0.1-2002-08-20-18:48:28 import
Igor Sysoev <igor@sysoev.ru>
parents:
2
diff
changeset
|
21 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
|
22 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
|
23 |
ffffe1499bce
nginx-0.0.1-2002-08-16-19:27:03 import
Igor Sysoev <igor@sysoev.ru>
parents:
diff
changeset
|
24 |
1633
74b2a52bc3c9
TransmitPackets(), ConnectEx(), and DisconnectEx()
Igor Sysoev <igor@sysoev.ru>
parents:
501
diff
changeset
|
25 #define ngx_socket(af, type, proto) \ |
6230
2a621245f4cf
Win32: MSVC 2015 compatibility.
Maxim Dounin <mdounin@mdounin.ru>
parents:
4412
diff
changeset
|
26 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
|
27 |
6230
2a621245f4cf
Win32: MSVC 2015 compatibility.
Maxim Dounin <mdounin@mdounin.ru>
parents:
4412
diff
changeset
|
28 #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
|
29 |
8
708f8bb772ec
nginx-0.0.1-2002-09-02-18:48:24 import
Igor Sysoev <igor@sysoev.ru>
parents:
6
diff
changeset
|
30 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
|
31 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
|
32 |
6
669801705ab1
nginx-0.0.1-2002-08-26-19:18:19 import
Igor Sysoev <igor@sysoev.ru>
parents:
3
diff
changeset
|
33 #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
|
34 #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
|
35 |
7583
efd71d49bde0
Events: available bytes calculation via ioctl(FIONREAD).
Maxim Dounin <mdounin@mdounin.ru>
parents:
7444
diff
changeset
|
36 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
|
37 #define ngx_socket_nread_n "ioctlsocket(FIONREAD)" |
efd71d49bde0
Events: available bytes calculation via ioctl(FIONREAD).
Maxim Dounin <mdounin@mdounin.ru>
parents:
7444
diff
changeset
|
38 |
13
2aba961a1d34
nginx-0.0.1-2002-09-16-19:01:44 import
Igor Sysoev <igor@sysoev.ru>
parents:
8
diff
changeset
|
39 #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
|
40 #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
|
41 |
3
34a521b1a148
nginx-0.0.1-2002-08-20-18:48:28 import
Igor Sysoev <igor@sysoev.ru>
parents:
2
diff
changeset
|
42 #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
|
43 #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
|
44 |
ffffe1499bce
nginx-0.0.1-2002-08-16-19:27:03 import
Igor Sysoev <igor@sysoev.ru>
parents:
diff
changeset
|
45 |
282
30310107dbc9
nginx-0.0.2-2004-03-09-22:47:07 import
Igor Sysoev <igor@sysoev.ru>
parents:
186
diff
changeset
|
46 #ifndef WSAID_ACCEPTEX |
30310107dbc9
nginx-0.0.2-2004-03-09-22:47:07 import
Igor Sysoev <igor@sysoev.ru>
parents:
186
diff
changeset
|
47 |
30310107dbc9
nginx-0.0.2-2004-03-09-22:47:07 import
Igor Sysoev <igor@sysoev.ru>
parents:
186
diff
changeset
|
48 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
|
49 IN SOCKET sListenSocket, |
30310107dbc9
nginx-0.0.2-2004-03-09-22:47:07 import
Igor Sysoev <igor@sysoev.ru>
parents:
186
diff
changeset
|
50 IN SOCKET sAcceptSocket, |
30310107dbc9
nginx-0.0.2-2004-03-09-22:47:07 import
Igor Sysoev <igor@sysoev.ru>
parents:
186
diff
changeset
|
51 IN PVOID lpOutputBuffer, |
30310107dbc9
nginx-0.0.2-2004-03-09-22:47:07 import
Igor Sysoev <igor@sysoev.ru>
parents:
186
diff
changeset
|
52 IN DWORD dwReceiveDataLength, |
30310107dbc9
nginx-0.0.2-2004-03-09-22:47:07 import
Igor Sysoev <igor@sysoev.ru>
parents:
186
diff
changeset
|
53 IN DWORD dwLocalAddressLength, |
30310107dbc9
nginx-0.0.2-2004-03-09-22:47:07 import
Igor Sysoev <igor@sysoev.ru>
parents:
186
diff
changeset
|
54 IN DWORD dwRemoteAddressLength, |
30310107dbc9
nginx-0.0.2-2004-03-09-22:47:07 import
Igor Sysoev <igor@sysoev.ru>
parents:
186
diff
changeset
|
55 OUT LPDWORD lpdwBytesReceived, |
30310107dbc9
nginx-0.0.2-2004-03-09-22:47:07 import
Igor Sysoev <igor@sysoev.ru>
parents:
186
diff
changeset
|
56 IN LPOVERLAPPED lpOverlapped |
30310107dbc9
nginx-0.0.2-2004-03-09-22:47:07 import
Igor Sysoev <igor@sysoev.ru>
parents:
186
diff
changeset
|
57 ); |
30310107dbc9
nginx-0.0.2-2004-03-09-22:47:07 import
Igor Sysoev <igor@sysoev.ru>
parents:
186
diff
changeset
|
58 |
1633
74b2a52bc3c9
TransmitPackets(), ConnectEx(), and DisconnectEx()
Igor Sysoev <igor@sysoev.ru>
parents:
501
diff
changeset
|
59 #define WSAID_ACCEPTEX \ |
74b2a52bc3c9
TransmitPackets(), ConnectEx(), and DisconnectEx()
Igor Sysoev <igor@sysoev.ru>
parents:
501
diff
changeset
|
60 {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
|
61 |
30310107dbc9
nginx-0.0.2-2004-03-09-22:47:07 import
Igor Sysoev <igor@sysoev.ru>
parents:
186
diff
changeset
|
62 #endif |
30310107dbc9
nginx-0.0.2-2004-03-09-22:47:07 import
Igor Sysoev <igor@sysoev.ru>
parents:
186
diff
changeset
|
63 |
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 #ifndef WSAID_GETACCEPTEXSOCKADDRS |
30310107dbc9
nginx-0.0.2-2004-03-09-22:47:07 import
Igor Sysoev <igor@sysoev.ru>
parents:
186
diff
changeset
|
66 |
30310107dbc9
nginx-0.0.2-2004-03-09-22:47:07 import
Igor Sysoev <igor@sysoev.ru>
parents:
186
diff
changeset
|
67 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
|
68 IN PVOID lpOutputBuffer, |
30310107dbc9
nginx-0.0.2-2004-03-09-22:47:07 import
Igor Sysoev <igor@sysoev.ru>
parents:
186
diff
changeset
|
69 IN DWORD dwReceiveDataLength, |
30310107dbc9
nginx-0.0.2-2004-03-09-22:47:07 import
Igor Sysoev <igor@sysoev.ru>
parents:
186
diff
changeset
|
70 IN DWORD dwLocalAddressLength, |
30310107dbc9
nginx-0.0.2-2004-03-09-22:47:07 import
Igor Sysoev <igor@sysoev.ru>
parents:
186
diff
changeset
|
71 IN DWORD dwRemoteAddressLength, |
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 **LocalSockaddr, |
30310107dbc9
nginx-0.0.2-2004-03-09-22:47:07 import
Igor Sysoev <igor@sysoev.ru>
parents:
186
diff
changeset
|
73 OUT LPINT LocalSockaddrLength, |
30310107dbc9
nginx-0.0.2-2004-03-09-22:47:07 import
Igor Sysoev <igor@sysoev.ru>
parents:
186
diff
changeset
|
74 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
|
75 OUT LPINT RemoteSockaddrLength |
30310107dbc9
nginx-0.0.2-2004-03-09-22:47:07 import
Igor Sysoev <igor@sysoev.ru>
parents:
186
diff
changeset
|
76 ); |
30310107dbc9
nginx-0.0.2-2004-03-09-22:47:07 import
Igor Sysoev <igor@sysoev.ru>
parents:
186
diff
changeset
|
77 |
1633
74b2a52bc3c9
TransmitPackets(), ConnectEx(), and DisconnectEx()
Igor Sysoev <igor@sysoev.ru>
parents:
501
diff
changeset
|
78 #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
|
79 {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
|
80 |
30310107dbc9
nginx-0.0.2-2004-03-09-22:47:07 import
Igor Sysoev <igor@sysoev.ru>
parents:
186
diff
changeset
|
81 #endif |
30310107dbc9
nginx-0.0.2-2004-03-09-22:47:07 import
Igor Sysoev <igor@sysoev.ru>
parents:
186
diff
changeset
|
82 |
30310107dbc9
nginx-0.0.2-2004-03-09-22:47:07 import
Igor Sysoev <igor@sysoev.ru>
parents:
186
diff
changeset
|
83 |
1633
74b2a52bc3c9
TransmitPackets(), ConnectEx(), and DisconnectEx()
Igor Sysoev <igor@sysoev.ru>
parents:
501
diff
changeset
|
84 #ifndef WSAID_TRANSMITFILE |
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 #ifndef TF_DISCONNECT |
74b2a52bc3c9
TransmitPackets(), ConnectEx(), and DisconnectEx()
Igor Sysoev <igor@sysoev.ru>
parents:
501
diff
changeset
|
87 |
74b2a52bc3c9
TransmitPackets(), ConnectEx(), and DisconnectEx()
Igor Sysoev <igor@sysoev.ru>
parents:
501
diff
changeset
|
88 #define TF_DISCONNECT 1 |
74b2a52bc3c9
TransmitPackets(), ConnectEx(), and DisconnectEx()
Igor Sysoev <igor@sysoev.ru>
parents:
501
diff
changeset
|
89 #define TF_REUSE_SOCKET 2 |
74b2a52bc3c9
TransmitPackets(), ConnectEx(), and DisconnectEx()
Igor Sysoev <igor@sysoev.ru>
parents:
501
diff
changeset
|
90 #define TF_WRITE_BEHIND 4 |
74b2a52bc3c9
TransmitPackets(), ConnectEx(), and DisconnectEx()
Igor Sysoev <igor@sysoev.ru>
parents:
501
diff
changeset
|
91 #define TF_USE_DEFAULT_WORKER 0 |
74b2a52bc3c9
TransmitPackets(), ConnectEx(), and DisconnectEx()
Igor Sysoev <igor@sysoev.ru>
parents:
501
diff
changeset
|
92 #define TF_USE_SYSTEM_THREAD 16 |
74b2a52bc3c9
TransmitPackets(), ConnectEx(), and DisconnectEx()
Igor Sysoev <igor@sysoev.ru>
parents:
501
diff
changeset
|
93 #define TF_USE_KERNEL_APC 32 |
74b2a52bc3c9
TransmitPackets(), ConnectEx(), and DisconnectEx()
Igor Sysoev <igor@sysoev.ru>
parents:
501
diff
changeset
|
94 |
74b2a52bc3c9
TransmitPackets(), ConnectEx(), and DisconnectEx()
Igor Sysoev <igor@sysoev.ru>
parents:
501
diff
changeset
|
95 typedef struct _TRANSMIT_FILE_BUFFERS { |
74b2a52bc3c9
TransmitPackets(), ConnectEx(), and DisconnectEx()
Igor Sysoev <igor@sysoev.ru>
parents:
501
diff
changeset
|
96 LPVOID Head; |
74b2a52bc3c9
TransmitPackets(), ConnectEx(), and DisconnectEx()
Igor Sysoev <igor@sysoev.ru>
parents:
501
diff
changeset
|
97 DWORD HeadLength; |
74b2a52bc3c9
TransmitPackets(), ConnectEx(), and DisconnectEx()
Igor Sysoev <igor@sysoev.ru>
parents:
501
diff
changeset
|
98 LPVOID Tail; |
74b2a52bc3c9
TransmitPackets(), ConnectEx(), and DisconnectEx()
Igor Sysoev <igor@sysoev.ru>
parents:
501
diff
changeset
|
99 DWORD TailLength; |
74b2a52bc3c9
TransmitPackets(), ConnectEx(), and DisconnectEx()
Igor Sysoev <igor@sysoev.ru>
parents:
501
diff
changeset
|
100 } TRANSMIT_FILE_BUFFERS, *PTRANSMIT_FILE_BUFFERS, FAR *LPTRANSMIT_FILE_BUFFERS; |
74b2a52bc3c9
TransmitPackets(), ConnectEx(), and DisconnectEx()
Igor Sysoev <igor@sysoev.ru>
parents:
501
diff
changeset
|
101 |
74b2a52bc3c9
TransmitPackets(), ConnectEx(), and DisconnectEx()
Igor Sysoev <igor@sysoev.ru>
parents:
501
diff
changeset
|
102 #endif |
282
30310107dbc9
nginx-0.0.2-2004-03-09-22:47:07 import
Igor Sysoev <igor@sysoev.ru>
parents:
186
diff
changeset
|
103 |
30310107dbc9
nginx-0.0.2-2004-03-09-22:47:07 import
Igor Sysoev <igor@sysoev.ru>
parents:
186
diff
changeset
|
104 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
|
105 IN SOCKET hSocket, |
30310107dbc9
nginx-0.0.2-2004-03-09-22:47:07 import
Igor Sysoev <igor@sysoev.ru>
parents:
186
diff
changeset
|
106 IN HANDLE hFile, |
30310107dbc9
nginx-0.0.2-2004-03-09-22:47:07 import
Igor Sysoev <igor@sysoev.ru>
parents:
186
diff
changeset
|
107 IN DWORD nNumberOfBytesToWrite, |
30310107dbc9
nginx-0.0.2-2004-03-09-22:47:07 import
Igor Sysoev <igor@sysoev.ru>
parents:
186
diff
changeset
|
108 IN DWORD nNumberOfBytesPerSend, |
30310107dbc9
nginx-0.0.2-2004-03-09-22:47:07 import
Igor Sysoev <igor@sysoev.ru>
parents:
186
diff
changeset
|
109 IN LPOVERLAPPED lpOverlapped, |
30310107dbc9
nginx-0.0.2-2004-03-09-22:47:07 import
Igor Sysoev <igor@sysoev.ru>
parents:
186
diff
changeset
|
110 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
|
111 IN DWORD dwReserved |
30310107dbc9
nginx-0.0.2-2004-03-09-22:47:07 import
Igor Sysoev <igor@sysoev.ru>
parents:
186
diff
changeset
|
112 ); |
30310107dbc9
nginx-0.0.2-2004-03-09-22:47:07 import
Igor Sysoev <igor@sysoev.ru>
parents:
186
diff
changeset
|
113 |
1633
74b2a52bc3c9
TransmitPackets(), ConnectEx(), and DisconnectEx()
Igor Sysoev <igor@sysoev.ru>
parents:
501
diff
changeset
|
114 #define WSAID_TRANSMITFILE \ |
74b2a52bc3c9
TransmitPackets(), ConnectEx(), and DisconnectEx()
Igor Sysoev <igor@sysoev.ru>
parents:
501
diff
changeset
|
115 {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
|
116 |
30310107dbc9
nginx-0.0.2-2004-03-09-22:47:07 import
Igor Sysoev <igor@sysoev.ru>
parents:
186
diff
changeset
|
117 #endif |
30310107dbc9
nginx-0.0.2-2004-03-09-22:47:07 import
Igor Sysoev <igor@sysoev.ru>
parents:
186
diff
changeset
|
118 |
30310107dbc9
nginx-0.0.2-2004-03-09-22:47:07 import
Igor Sysoev <igor@sysoev.ru>
parents:
186
diff
changeset
|
119 |
1633
74b2a52bc3c9
TransmitPackets(), ConnectEx(), and DisconnectEx()
Igor Sysoev <igor@sysoev.ru>
parents:
501
diff
changeset
|
120 #ifndef WSAID_TRANSMITPACKETS |
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 /* 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
|
123 |
74b2a52bc3c9
TransmitPackets(), ConnectEx(), and DisconnectEx()
Igor Sysoev <igor@sysoev.ru>
parents:
501
diff
changeset
|
124 #ifndef TP_ELEMENT_FILE |
74b2a52bc3c9
TransmitPackets(), ConnectEx(), and DisconnectEx()
Igor Sysoev <igor@sysoev.ru>
parents:
501
diff
changeset
|
125 |
74b2a52bc3c9
TransmitPackets(), ConnectEx(), and DisconnectEx()
Igor Sysoev <igor@sysoev.ru>
parents:
501
diff
changeset
|
126 #ifdef _MSC_VER |
74b2a52bc3c9
TransmitPackets(), ConnectEx(), and DisconnectEx()
Igor Sysoev <igor@sysoev.ru>
parents:
501
diff
changeset
|
127 #pragma warning(disable:4201) /* Nonstandard extension, nameless struct/union */ |
74b2a52bc3c9
TransmitPackets(), ConnectEx(), and DisconnectEx()
Igor Sysoev <igor@sysoev.ru>
parents:
501
diff
changeset
|
128 #endif |
74b2a52bc3c9
TransmitPackets(), ConnectEx(), and DisconnectEx()
Igor Sysoev <igor@sysoev.ru>
parents:
501
diff
changeset
|
129 |
1679
ca317d9b5c09
style fix: remove trailing spaces
Igor Sysoev <igor@sysoev.ru>
parents:
1633
diff
changeset
|
130 typedef struct _TRANSMIT_PACKETS_ELEMENT { |
ca317d9b5c09
style fix: remove trailing spaces
Igor Sysoev <igor@sysoev.ru>
parents:
1633
diff
changeset
|
131 ULONG dwElFlags; |
1633
74b2a52bc3c9
TransmitPackets(), ConnectEx(), and DisconnectEx()
Igor Sysoev <igor@sysoev.ru>
parents:
501
diff
changeset
|
132 #define TP_ELEMENT_MEMORY 1 |
74b2a52bc3c9
TransmitPackets(), ConnectEx(), and DisconnectEx()
Igor Sysoev <igor@sysoev.ru>
parents:
501
diff
changeset
|
133 #define TP_ELEMENT_FILE 2 |
74b2a52bc3c9
TransmitPackets(), ConnectEx(), and DisconnectEx()
Igor Sysoev <igor@sysoev.ru>
parents:
501
diff
changeset
|
134 #define TP_ELEMENT_EOP 4 |
1679
ca317d9b5c09
style fix: remove trailing spaces
Igor Sysoev <igor@sysoev.ru>
parents:
1633
diff
changeset
|
135 ULONG cLength; |
1633
74b2a52bc3c9
TransmitPackets(), ConnectEx(), and DisconnectEx()
Igor Sysoev <igor@sysoev.ru>
parents:
501
diff
changeset
|
136 union { |
74b2a52bc3c9
TransmitPackets(), ConnectEx(), and DisconnectEx()
Igor Sysoev <igor@sysoev.ru>
parents:
501
diff
changeset
|
137 struct { |
74b2a52bc3c9
TransmitPackets(), ConnectEx(), and DisconnectEx()
Igor Sysoev <igor@sysoev.ru>
parents:
501
diff
changeset
|
138 LARGE_INTEGER nFileOffset; |
74b2a52bc3c9
TransmitPackets(), ConnectEx(), and DisconnectEx()
Igor Sysoev <igor@sysoev.ru>
parents:
501
diff
changeset
|
139 HANDLE hFile; |
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 PVOID pBuffer; |
74b2a52bc3c9
TransmitPackets(), ConnectEx(), and DisconnectEx()
Igor Sysoev <igor@sysoev.ru>
parents:
501
diff
changeset
|
142 }; |
74b2a52bc3c9
TransmitPackets(), ConnectEx(), and DisconnectEx()
Igor Sysoev <igor@sysoev.ru>
parents:
501
diff
changeset
|
143 } TRANSMIT_PACKETS_ELEMENT, *PTRANSMIT_PACKETS_ELEMENT, |
74b2a52bc3c9
TransmitPackets(), ConnectEx(), and DisconnectEx()
Igor Sysoev <igor@sysoev.ru>
parents:
501
diff
changeset
|
144 FAR *LPTRANSMIT_PACKETS_ELEMENT; |
74b2a52bc3c9
TransmitPackets(), ConnectEx(), and DisconnectEx()
Igor Sysoev <igor@sysoev.ru>
parents:
501
diff
changeset
|
145 |
74b2a52bc3c9
TransmitPackets(), ConnectEx(), and DisconnectEx()
Igor Sysoev <igor@sysoev.ru>
parents:
501
diff
changeset
|
146 #ifdef _MSC_VER |
74b2a52bc3c9
TransmitPackets(), ConnectEx(), and DisconnectEx()
Igor Sysoev <igor@sysoev.ru>
parents:
501
diff
changeset
|
147 #pragma warning(default:4201) |
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 #endif |
74b2a52bc3c9
TransmitPackets(), ConnectEx(), and DisconnectEx()
Igor Sysoev <igor@sysoev.ru>
parents:
501
diff
changeset
|
151 |
74b2a52bc3c9
TransmitPackets(), ConnectEx(), and DisconnectEx()
Igor Sysoev <igor@sysoev.ru>
parents:
501
diff
changeset
|
152 typedef BOOL (PASCAL FAR * LPFN_TRANSMITPACKETS) ( |
1679
ca317d9b5c09
style fix: remove trailing spaces
Igor Sysoev <igor@sysoev.ru>
parents:
1633
diff
changeset
|
153 SOCKET hSocket, |
ca317d9b5c09
style fix: remove trailing spaces
Igor Sysoev <igor@sysoev.ru>
parents:
1633
diff
changeset
|
154 TRANSMIT_PACKETS_ELEMENT *lpPacketArray, |
ca317d9b5c09
style fix: remove trailing spaces
Igor Sysoev <igor@sysoev.ru>
parents:
1633
diff
changeset
|
155 DWORD nElementCount, |
ca317d9b5c09
style fix: remove trailing spaces
Igor Sysoev <igor@sysoev.ru>
parents:
1633
diff
changeset
|
156 DWORD nSendSize, |
ca317d9b5c09
style fix: remove trailing spaces
Igor Sysoev <igor@sysoev.ru>
parents:
1633
diff
changeset
|
157 LPOVERLAPPED lpOverlapped, |
ca317d9b5c09
style fix: remove trailing spaces
Igor Sysoev <igor@sysoev.ru>
parents:
1633
diff
changeset
|
158 DWORD dwFlags |
1633
74b2a52bc3c9
TransmitPackets(), ConnectEx(), and DisconnectEx()
Igor Sysoev <igor@sysoev.ru>
parents:
501
diff
changeset
|
159 ); |
74b2a52bc3c9
TransmitPackets(), ConnectEx(), and DisconnectEx()
Igor Sysoev <igor@sysoev.ru>
parents:
501
diff
changeset
|
160 |
74b2a52bc3c9
TransmitPackets(), ConnectEx(), and DisconnectEx()
Igor Sysoev <igor@sysoev.ru>
parents:
501
diff
changeset
|
161 #define WSAID_TRANSMITPACKETS \ |
74b2a52bc3c9
TransmitPackets(), ConnectEx(), and DisconnectEx()
Igor Sysoev <igor@sysoev.ru>
parents:
501
diff
changeset
|
162 {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
|
163 |
74b2a52bc3c9
TransmitPackets(), ConnectEx(), and DisconnectEx()
Igor Sysoev <igor@sysoev.ru>
parents:
501
diff
changeset
|
164 #endif |
74b2a52bc3c9
TransmitPackets(), ConnectEx(), and DisconnectEx()
Igor Sysoev <igor@sysoev.ru>
parents:
501
diff
changeset
|
165 |
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 #ifndef WSAID_CONNECTEX |
74b2a52bc3c9
TransmitPackets(), ConnectEx(), and DisconnectEx()
Igor Sysoev <igor@sysoev.ru>
parents:
501
diff
changeset
|
168 |
74b2a52bc3c9
TransmitPackets(), ConnectEx(), and DisconnectEx()
Igor Sysoev <igor@sysoev.ru>
parents:
501
diff
changeset
|
169 typedef BOOL (PASCAL FAR * LPFN_CONNECTEX) ( |
74b2a52bc3c9
TransmitPackets(), ConnectEx(), and DisconnectEx()
Igor Sysoev <igor@sysoev.ru>
parents:
501
diff
changeset
|
170 IN SOCKET s, |
74b2a52bc3c9
TransmitPackets(), ConnectEx(), and DisconnectEx()
Igor Sysoev <igor@sysoev.ru>
parents:
501
diff
changeset
|
171 IN const struct sockaddr FAR *name, |
74b2a52bc3c9
TransmitPackets(), ConnectEx(), and DisconnectEx()
Igor Sysoev <igor@sysoev.ru>
parents:
501
diff
changeset
|
172 IN int namelen, |
74b2a52bc3c9
TransmitPackets(), ConnectEx(), and DisconnectEx()
Igor Sysoev <igor@sysoev.ru>
parents:
501
diff
changeset
|
173 IN PVOID lpSendBuffer OPTIONAL, |
74b2a52bc3c9
TransmitPackets(), ConnectEx(), and DisconnectEx()
Igor Sysoev <igor@sysoev.ru>
parents:
501
diff
changeset
|
174 IN DWORD dwSendDataLength, |
74b2a52bc3c9
TransmitPackets(), ConnectEx(), and DisconnectEx()
Igor Sysoev <igor@sysoev.ru>
parents:
501
diff
changeset
|
175 OUT LPDWORD lpdwBytesSent, |
74b2a52bc3c9
TransmitPackets(), ConnectEx(), and DisconnectEx()
Igor Sysoev <igor@sysoev.ru>
parents:
501
diff
changeset
|
176 IN LPOVERLAPPED lpOverlapped |
74b2a52bc3c9
TransmitPackets(), ConnectEx(), and DisconnectEx()
Igor Sysoev <igor@sysoev.ru>
parents:
501
diff
changeset
|
177 ); |
74b2a52bc3c9
TransmitPackets(), ConnectEx(), and DisconnectEx()
Igor Sysoev <igor@sysoev.ru>
parents:
501
diff
changeset
|
178 |
74b2a52bc3c9
TransmitPackets(), ConnectEx(), and DisconnectEx()
Igor Sysoev <igor@sysoev.ru>
parents:
501
diff
changeset
|
179 #define WSAID_CONNECTEX \ |
74b2a52bc3c9
TransmitPackets(), ConnectEx(), and DisconnectEx()
Igor Sysoev <igor@sysoev.ru>
parents:
501
diff
changeset
|
180 {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
|
181 |
74b2a52bc3c9
TransmitPackets(), ConnectEx(), and DisconnectEx()
Igor Sysoev <igor@sysoev.ru>
parents:
501
diff
changeset
|
182 #endif |
74b2a52bc3c9
TransmitPackets(), ConnectEx(), and DisconnectEx()
Igor Sysoev <igor@sysoev.ru>
parents:
501
diff
changeset
|
183 |
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 #ifndef WSAID_DISCONNECTEX |
74b2a52bc3c9
TransmitPackets(), ConnectEx(), and DisconnectEx()
Igor Sysoev <igor@sysoev.ru>
parents:
501
diff
changeset
|
186 |
74b2a52bc3c9
TransmitPackets(), ConnectEx(), and DisconnectEx()
Igor Sysoev <igor@sysoev.ru>
parents:
501
diff
changeset
|
187 typedef BOOL (PASCAL FAR * LPFN_DISCONNECTEX) ( |
74b2a52bc3c9
TransmitPackets(), ConnectEx(), and DisconnectEx()
Igor Sysoev <igor@sysoev.ru>
parents:
501
diff
changeset
|
188 IN SOCKET s, |
74b2a52bc3c9
TransmitPackets(), ConnectEx(), and DisconnectEx()
Igor Sysoev <igor@sysoev.ru>
parents:
501
diff
changeset
|
189 IN LPOVERLAPPED lpOverlapped, |
74b2a52bc3c9
TransmitPackets(), ConnectEx(), and DisconnectEx()
Igor Sysoev <igor@sysoev.ru>
parents:
501
diff
changeset
|
190 IN DWORD dwFlags, |
74b2a52bc3c9
TransmitPackets(), ConnectEx(), and DisconnectEx()
Igor Sysoev <igor@sysoev.ru>
parents:
501
diff
changeset
|
191 IN DWORD dwReserved |
74b2a52bc3c9
TransmitPackets(), ConnectEx(), and DisconnectEx()
Igor Sysoev <igor@sysoev.ru>
parents:
501
diff
changeset
|
192 ); |
74b2a52bc3c9
TransmitPackets(), ConnectEx(), and DisconnectEx()
Igor Sysoev <igor@sysoev.ru>
parents:
501
diff
changeset
|
193 |
74b2a52bc3c9
TransmitPackets(), ConnectEx(), and DisconnectEx()
Igor Sysoev <igor@sysoev.ru>
parents:
501
diff
changeset
|
194 #define WSAID_DISCONNECTEX \ |
74b2a52bc3c9
TransmitPackets(), ConnectEx(), and DisconnectEx()
Igor Sysoev <igor@sysoev.ru>
parents:
501
diff
changeset
|
195 {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
|
196 |
74b2a52bc3c9
TransmitPackets(), ConnectEx(), and DisconnectEx()
Igor Sysoev <igor@sysoev.ru>
parents:
501
diff
changeset
|
197 #endif |
74b2a52bc3c9
TransmitPackets(), ConnectEx(), and DisconnectEx()
Igor Sysoev <igor@sysoev.ru>
parents:
501
diff
changeset
|
198 |
74b2a52bc3c9
TransmitPackets(), ConnectEx(), and DisconnectEx()
Igor Sysoev <igor@sysoev.ru>
parents:
501
diff
changeset
|
199 |
74b2a52bc3c9
TransmitPackets(), ConnectEx(), and DisconnectEx()
Igor Sysoev <igor@sysoev.ru>
parents:
501
diff
changeset
|
200 extern LPFN_ACCEPTEX ngx_acceptex; |
74b2a52bc3c9
TransmitPackets(), ConnectEx(), and DisconnectEx()
Igor Sysoev <igor@sysoev.ru>
parents:
501
diff
changeset
|
201 extern LPFN_GETACCEPTEXSOCKADDRS ngx_getacceptexsockaddrs; |
74b2a52bc3c9
TransmitPackets(), ConnectEx(), and DisconnectEx()
Igor Sysoev <igor@sysoev.ru>
parents:
501
diff
changeset
|
202 extern LPFN_TRANSMITFILE ngx_transmitfile; |
74b2a52bc3c9
TransmitPackets(), ConnectEx(), and DisconnectEx()
Igor Sysoev <igor@sysoev.ru>
parents:
501
diff
changeset
|
203 extern LPFN_TRANSMITPACKETS ngx_transmitpackets; |
74b2a52bc3c9
TransmitPackets(), ConnectEx(), and DisconnectEx()
Igor Sysoev <igor@sysoev.ru>
parents:
501
diff
changeset
|
204 extern LPFN_CONNECTEX ngx_connectex; |
74b2a52bc3c9
TransmitPackets(), ConnectEx(), and DisconnectEx()
Igor Sysoev <igor@sysoev.ru>
parents:
501
diff
changeset
|
205 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
|
206 |
8
708f8bb772ec
nginx-0.0.1-2002-09-02-18:48:24 import
Igor Sysoev <igor@sysoev.ru>
parents:
6
diff
changeset
|
207 |
7444
4089b3d2cb59
Win32: added WSAPoll() support.
Maxim Dounin <mdounin@mdounin.ru>
parents:
6230
diff
changeset
|
208 #if (NGX_HAVE_POLL && !defined POLLIN) |
4089b3d2cb59
Win32: added WSAPoll() support.
Maxim Dounin <mdounin@mdounin.ru>
parents:
6230
diff
changeset
|
209 |
4089b3d2cb59
Win32: added WSAPoll() support.
Maxim Dounin <mdounin@mdounin.ru>
parents:
6230
diff
changeset
|
210 /* |
4089b3d2cb59
Win32: added WSAPoll() support.
Maxim Dounin <mdounin@mdounin.ru>
parents:
6230
diff
changeset
|
211 * WSAPoll() is only available if _WIN32_WINNT >= 0x0600. |
4089b3d2cb59
Win32: added WSAPoll() support.
Maxim Dounin <mdounin@mdounin.ru>
parents:
6230
diff
changeset
|
212 * If it is not available during compilation, we try to |
4089b3d2cb59
Win32: added WSAPoll() support.
Maxim Dounin <mdounin@mdounin.ru>
parents:
6230
diff
changeset
|
213 * load it dynamically at runtime. |
4089b3d2cb59
Win32: added WSAPoll() support.
Maxim Dounin <mdounin@mdounin.ru>
parents:
6230
diff
changeset
|
214 */ |
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 NGX_LOAD_WSAPOLL 1 |
4089b3d2cb59
Win32: added WSAPoll() support.
Maxim Dounin <mdounin@mdounin.ru>
parents:
6230
diff
changeset
|
217 |
4089b3d2cb59
Win32: added WSAPoll() support.
Maxim Dounin <mdounin@mdounin.ru>
parents:
6230
diff
changeset
|
218 #define POLLRDNORM 0x0100 |
4089b3d2cb59
Win32: added WSAPoll() support.
Maxim Dounin <mdounin@mdounin.ru>
parents:
6230
diff
changeset
|
219 #define POLLRDBAND 0x0200 |
4089b3d2cb59
Win32: added WSAPoll() support.
Maxim Dounin <mdounin@mdounin.ru>
parents:
6230
diff
changeset
|
220 #define POLLIN (POLLRDNORM | POLLRDBAND) |
4089b3d2cb59
Win32: added WSAPoll() support.
Maxim Dounin <mdounin@mdounin.ru>
parents:
6230
diff
changeset
|
221 #define POLLPRI 0x0400 |
4089b3d2cb59
Win32: added WSAPoll() support.
Maxim Dounin <mdounin@mdounin.ru>
parents:
6230
diff
changeset
|
222 |
4089b3d2cb59
Win32: added WSAPoll() support.
Maxim Dounin <mdounin@mdounin.ru>
parents:
6230
diff
changeset
|
223 #define POLLWRNORM 0x0010 |
4089b3d2cb59
Win32: added WSAPoll() support.
Maxim Dounin <mdounin@mdounin.ru>
parents:
6230
diff
changeset
|
224 #define POLLOUT (POLLWRNORM) |
4089b3d2cb59
Win32: added WSAPoll() support.
Maxim Dounin <mdounin@mdounin.ru>
parents:
6230
diff
changeset
|
225 #define POLLWRBAND 0x0020 |
4089b3d2cb59
Win32: added WSAPoll() support.
Maxim Dounin <mdounin@mdounin.ru>
parents:
6230
diff
changeset
|
226 |
4089b3d2cb59
Win32: added WSAPoll() support.
Maxim Dounin <mdounin@mdounin.ru>
parents:
6230
diff
changeset
|
227 #define POLLERR 0x0001 |
4089b3d2cb59
Win32: added WSAPoll() support.
Maxim Dounin <mdounin@mdounin.ru>
parents:
6230
diff
changeset
|
228 #define POLLHUP 0x0002 |
4089b3d2cb59
Win32: added WSAPoll() support.
Maxim Dounin <mdounin@mdounin.ru>
parents:
6230
diff
changeset
|
229 #define POLLNVAL 0x0004 |
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 typedef struct pollfd { |
4089b3d2cb59
Win32: added WSAPoll() support.
Maxim Dounin <mdounin@mdounin.ru>
parents:
6230
diff
changeset
|
232 |
4089b3d2cb59
Win32: added WSAPoll() support.
Maxim Dounin <mdounin@mdounin.ru>
parents:
6230
diff
changeset
|
233 SOCKET fd; |
4089b3d2cb59
Win32: added WSAPoll() support.
Maxim Dounin <mdounin@mdounin.ru>
parents:
6230
diff
changeset
|
234 SHORT events; |
4089b3d2cb59
Win32: added WSAPoll() support.
Maxim Dounin <mdounin@mdounin.ru>
parents:
6230
diff
changeset
|
235 SHORT revents; |
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 } WSAPOLLFD, *PWSAPOLLFD, FAR *LPWSAPOLLFD; |
4089b3d2cb59
Win32: added WSAPoll() support.
Maxim Dounin <mdounin@mdounin.ru>
parents:
6230
diff
changeset
|
238 |
4089b3d2cb59
Win32: added WSAPoll() support.
Maxim Dounin <mdounin@mdounin.ru>
parents:
6230
diff
changeset
|
239 typedef int (WSAAPI *ngx_wsapoll_pt)( |
4089b3d2cb59
Win32: added WSAPoll() support.
Maxim Dounin <mdounin@mdounin.ru>
parents:
6230
diff
changeset
|
240 LPWSAPOLLFD fdArray, |
4089b3d2cb59
Win32: added WSAPoll() support.
Maxim Dounin <mdounin@mdounin.ru>
parents:
6230
diff
changeset
|
241 ULONG fds, |
4089b3d2cb59
Win32: added WSAPoll() support.
Maxim Dounin <mdounin@mdounin.ru>
parents:
6230
diff
changeset
|
242 INT timeout |
4089b3d2cb59
Win32: added WSAPoll() support.
Maxim Dounin <mdounin@mdounin.ru>
parents:
6230
diff
changeset
|
243 ); |
4089b3d2cb59
Win32: added WSAPoll() support.
Maxim Dounin <mdounin@mdounin.ru>
parents:
6230
diff
changeset
|
244 |
4089b3d2cb59
Win32: added WSAPoll() support.
Maxim Dounin <mdounin@mdounin.ru>
parents:
6230
diff
changeset
|
245 extern ngx_wsapoll_pt WSAPoll; |
4089b3d2cb59
Win32: added WSAPoll() support.
Maxim Dounin <mdounin@mdounin.ru>
parents:
6230
diff
changeset
|
246 extern ngx_uint_t ngx_have_wsapoll; |
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 #endif |
4089b3d2cb59
Win32: added WSAPoll() support.
Maxim Dounin <mdounin@mdounin.ru>
parents:
6230
diff
changeset
|
249 |
4089b3d2cb59
Win32: added WSAPoll() support.
Maxim Dounin <mdounin@mdounin.ru>
parents:
6230
diff
changeset
|
250 |
501 | 251 int ngx_tcp_push(ngx_socket_t s); |
1633
74b2a52bc3c9
TransmitPackets(), ConnectEx(), and DisconnectEx()
Igor Sysoev <igor@sysoev.ru>
parents:
501
diff
changeset
|
252 #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
|
253 |
6dfda4cf5200
nginx-0.0.1-2003-06-11-19:28:34 import
Igor Sysoev <igor@sysoev.ru>
parents:
100
diff
changeset
|
254 |
2
ffffe1499bce
nginx-0.0.1-2002-08-16-19:27:03 import
Igor Sysoev <igor@sysoev.ru>
parents:
diff
changeset
|
255 #endif /* _NGX_SOCKET_H_INCLUDED_ */ |