Mercurial > hg > nginx-quic
annotate src/os/win32/ngx_socket.h @ 3023:7d5501988fe3
NGX_ENOPATH
author | Igor Sysoev <igor@sysoev.ru> |
---|---|
date | Tue, 11 Aug 2009 14:25:04 +0000 |
parents | ca317d9b5c09 |
children | d620f497c50f |
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 |
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
|
4 */ |
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 |
2
ffffe1499bce
nginx-0.0.1-2002-08-16-19:27:03 import
Igor Sysoev <igor@sysoev.ru>
parents:
diff
changeset
|
7 #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
|
8 #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
|
9 |
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 #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
|
12 #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
|
13 |
2
ffffe1499bce
nginx-0.0.1-2002-08-16-19:27:03 import
Igor Sysoev <igor@sysoev.ru>
parents:
diff
changeset
|
14 |
13
2aba961a1d34
nginx-0.0.1-2002-09-16-19:01:44 import
Igor Sysoev <igor@sysoev.ru>
parents:
8
diff
changeset
|
15 #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
|
16 |
8
708f8bb772ec
nginx-0.0.1-2002-09-02-18:48:24 import
Igor Sysoev <igor@sysoev.ru>
parents:
6
diff
changeset
|
17 |
3
34a521b1a148
nginx-0.0.1-2002-08-20-18:48:28 import
Igor Sysoev <igor@sysoev.ru>
parents:
2
diff
changeset
|
18 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
|
19 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
|
20 |
ffffe1499bce
nginx-0.0.1-2002-08-16-19:27:03 import
Igor Sysoev <igor@sysoev.ru>
parents:
diff
changeset
|
21 |
1633
74b2a52bc3c9
TransmitPackets(), ConnectEx(), and DisconnectEx()
Igor Sysoev <igor@sysoev.ru>
parents:
501
diff
changeset
|
22 #define ngx_socket(af, type, proto) \ |
74b2a52bc3c9
TransmitPackets(), ConnectEx(), and DisconnectEx()
Igor Sysoev <igor@sysoev.ru>
parents:
501
diff
changeset
|
23 WSASocket(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
|
24 |
6
669801705ab1
nginx-0.0.1-2002-08-26-19:18:19 import
Igor Sysoev <igor@sysoev.ru>
parents:
3
diff
changeset
|
25 #define ngx_socket_n "WSASocket()" |
669801705ab1
nginx-0.0.1-2002-08-26-19:18:19 import
Igor Sysoev <igor@sysoev.ru>
parents:
3
diff
changeset
|
26 |
8
708f8bb772ec
nginx-0.0.1-2002-09-02-18:48:24 import
Igor Sysoev <igor@sysoev.ru>
parents:
6
diff
changeset
|
27 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
|
28 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
|
29 |
6
669801705ab1
nginx-0.0.1-2002-08-26-19:18:19 import
Igor Sysoev <igor@sysoev.ru>
parents:
3
diff
changeset
|
30 #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
|
31 #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
|
32 |
13
2aba961a1d34
nginx-0.0.1-2002-09-16-19:01:44 import
Igor Sysoev <igor@sysoev.ru>
parents:
8
diff
changeset
|
33 #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
|
34 #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
|
35 |
3
34a521b1a148
nginx-0.0.1-2002-08-20-18:48:28 import
Igor Sysoev <igor@sysoev.ru>
parents:
2
diff
changeset
|
36 #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
|
37 #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
|
38 |
ffffe1499bce
nginx-0.0.1-2002-08-16-19:27:03 import
Igor Sysoev <igor@sysoev.ru>
parents:
diff
changeset
|
39 |
282
30310107dbc9
nginx-0.0.2-2004-03-09-22:47:07 import
Igor Sysoev <igor@sysoev.ru>
parents:
186
diff
changeset
|
40 #ifndef WSAID_ACCEPTEX |
30310107dbc9
nginx-0.0.2-2004-03-09-22:47:07 import
Igor Sysoev <igor@sysoev.ru>
parents:
186
diff
changeset
|
41 |
30310107dbc9
nginx-0.0.2-2004-03-09-22:47:07 import
Igor Sysoev <igor@sysoev.ru>
parents:
186
diff
changeset
|
42 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
|
43 IN SOCKET sListenSocket, |
30310107dbc9
nginx-0.0.2-2004-03-09-22:47:07 import
Igor Sysoev <igor@sysoev.ru>
parents:
186
diff
changeset
|
44 IN SOCKET sAcceptSocket, |
30310107dbc9
nginx-0.0.2-2004-03-09-22:47:07 import
Igor Sysoev <igor@sysoev.ru>
parents:
186
diff
changeset
|
45 IN PVOID lpOutputBuffer, |
30310107dbc9
nginx-0.0.2-2004-03-09-22:47:07 import
Igor Sysoev <igor@sysoev.ru>
parents:
186
diff
changeset
|
46 IN DWORD dwReceiveDataLength, |
30310107dbc9
nginx-0.0.2-2004-03-09-22:47:07 import
Igor Sysoev <igor@sysoev.ru>
parents:
186
diff
changeset
|
47 IN DWORD dwLocalAddressLength, |
30310107dbc9
nginx-0.0.2-2004-03-09-22:47:07 import
Igor Sysoev <igor@sysoev.ru>
parents:
186
diff
changeset
|
48 IN DWORD dwRemoteAddressLength, |
30310107dbc9
nginx-0.0.2-2004-03-09-22:47:07 import
Igor Sysoev <igor@sysoev.ru>
parents:
186
diff
changeset
|
49 OUT LPDWORD lpdwBytesReceived, |
30310107dbc9
nginx-0.0.2-2004-03-09-22:47:07 import
Igor Sysoev <igor@sysoev.ru>
parents:
186
diff
changeset
|
50 IN LPOVERLAPPED lpOverlapped |
30310107dbc9
nginx-0.0.2-2004-03-09-22:47:07 import
Igor Sysoev <igor@sysoev.ru>
parents:
186
diff
changeset
|
51 ); |
30310107dbc9
nginx-0.0.2-2004-03-09-22:47:07 import
Igor Sysoev <igor@sysoev.ru>
parents:
186
diff
changeset
|
52 |
1633
74b2a52bc3c9
TransmitPackets(), ConnectEx(), and DisconnectEx()
Igor Sysoev <igor@sysoev.ru>
parents:
501
diff
changeset
|
53 #define WSAID_ACCEPTEX \ |
74b2a52bc3c9
TransmitPackets(), ConnectEx(), and DisconnectEx()
Igor Sysoev <igor@sysoev.ru>
parents:
501
diff
changeset
|
54 {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
|
55 |
30310107dbc9
nginx-0.0.2-2004-03-09-22:47:07 import
Igor Sysoev <igor@sysoev.ru>
parents:
186
diff
changeset
|
56 #endif |
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 |
30310107dbc9
nginx-0.0.2-2004-03-09-22:47:07 import
Igor Sysoev <igor@sysoev.ru>
parents:
186
diff
changeset
|
59 #ifndef WSAID_GETACCEPTEXSOCKADDRS |
30310107dbc9
nginx-0.0.2-2004-03-09-22:47:07 import
Igor Sysoev <igor@sysoev.ru>
parents:
186
diff
changeset
|
60 |
30310107dbc9
nginx-0.0.2-2004-03-09-22:47:07 import
Igor Sysoev <igor@sysoev.ru>
parents:
186
diff
changeset
|
61 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
|
62 IN PVOID lpOutputBuffer, |
30310107dbc9
nginx-0.0.2-2004-03-09-22:47:07 import
Igor Sysoev <igor@sysoev.ru>
parents:
186
diff
changeset
|
63 IN DWORD dwReceiveDataLength, |
30310107dbc9
nginx-0.0.2-2004-03-09-22:47:07 import
Igor Sysoev <igor@sysoev.ru>
parents:
186
diff
changeset
|
64 IN DWORD dwLocalAddressLength, |
30310107dbc9
nginx-0.0.2-2004-03-09-22:47:07 import
Igor Sysoev <igor@sysoev.ru>
parents:
186
diff
changeset
|
65 IN DWORD dwRemoteAddressLength, |
30310107dbc9
nginx-0.0.2-2004-03-09-22:47:07 import
Igor Sysoev <igor@sysoev.ru>
parents:
186
diff
changeset
|
66 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
|
67 OUT LPINT LocalSockaddrLength, |
30310107dbc9
nginx-0.0.2-2004-03-09-22:47:07 import
Igor Sysoev <igor@sysoev.ru>
parents:
186
diff
changeset
|
68 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
|
69 OUT LPINT RemoteSockaddrLength |
30310107dbc9
nginx-0.0.2-2004-03-09-22:47:07 import
Igor Sysoev <igor@sysoev.ru>
parents:
186
diff
changeset
|
70 ); |
30310107dbc9
nginx-0.0.2-2004-03-09-22:47:07 import
Igor Sysoev <igor@sysoev.ru>
parents:
186
diff
changeset
|
71 |
1633
74b2a52bc3c9
TransmitPackets(), ConnectEx(), and DisconnectEx()
Igor Sysoev <igor@sysoev.ru>
parents:
501
diff
changeset
|
72 #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
|
73 {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
|
74 |
30310107dbc9
nginx-0.0.2-2004-03-09-22:47:07 import
Igor Sysoev <igor@sysoev.ru>
parents:
186
diff
changeset
|
75 #endif |
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 #ifndef WSAID_TRANSMITFILE |
74b2a52bc3c9
TransmitPackets(), ConnectEx(), and DisconnectEx()
Igor Sysoev <igor@sysoev.ru>
parents:
501
diff
changeset
|
79 |
74b2a52bc3c9
TransmitPackets(), ConnectEx(), and DisconnectEx()
Igor Sysoev <igor@sysoev.ru>
parents:
501
diff
changeset
|
80 #ifndef TF_DISCONNECT |
74b2a52bc3c9
TransmitPackets(), ConnectEx(), and DisconnectEx()
Igor Sysoev <igor@sysoev.ru>
parents:
501
diff
changeset
|
81 |
74b2a52bc3c9
TransmitPackets(), ConnectEx(), and DisconnectEx()
Igor Sysoev <igor@sysoev.ru>
parents:
501
diff
changeset
|
82 #define TF_DISCONNECT 1 |
74b2a52bc3c9
TransmitPackets(), ConnectEx(), and DisconnectEx()
Igor Sysoev <igor@sysoev.ru>
parents:
501
diff
changeset
|
83 #define TF_REUSE_SOCKET 2 |
74b2a52bc3c9
TransmitPackets(), ConnectEx(), and DisconnectEx()
Igor Sysoev <igor@sysoev.ru>
parents:
501
diff
changeset
|
84 #define TF_WRITE_BEHIND 4 |
74b2a52bc3c9
TransmitPackets(), ConnectEx(), and DisconnectEx()
Igor Sysoev <igor@sysoev.ru>
parents:
501
diff
changeset
|
85 #define TF_USE_DEFAULT_WORKER 0 |
74b2a52bc3c9
TransmitPackets(), ConnectEx(), and DisconnectEx()
Igor Sysoev <igor@sysoev.ru>
parents:
501
diff
changeset
|
86 #define TF_USE_SYSTEM_THREAD 16 |
74b2a52bc3c9
TransmitPackets(), ConnectEx(), and DisconnectEx()
Igor Sysoev <igor@sysoev.ru>
parents:
501
diff
changeset
|
87 #define TF_USE_KERNEL_APC 32 |
74b2a52bc3c9
TransmitPackets(), ConnectEx(), and DisconnectEx()
Igor Sysoev <igor@sysoev.ru>
parents:
501
diff
changeset
|
88 |
74b2a52bc3c9
TransmitPackets(), ConnectEx(), and DisconnectEx()
Igor Sysoev <igor@sysoev.ru>
parents:
501
diff
changeset
|
89 typedef struct _TRANSMIT_FILE_BUFFERS { |
74b2a52bc3c9
TransmitPackets(), ConnectEx(), and DisconnectEx()
Igor Sysoev <igor@sysoev.ru>
parents:
501
diff
changeset
|
90 LPVOID Head; |
74b2a52bc3c9
TransmitPackets(), ConnectEx(), and DisconnectEx()
Igor Sysoev <igor@sysoev.ru>
parents:
501
diff
changeset
|
91 DWORD HeadLength; |
74b2a52bc3c9
TransmitPackets(), ConnectEx(), and DisconnectEx()
Igor Sysoev <igor@sysoev.ru>
parents:
501
diff
changeset
|
92 LPVOID Tail; |
74b2a52bc3c9
TransmitPackets(), ConnectEx(), and DisconnectEx()
Igor Sysoev <igor@sysoev.ru>
parents:
501
diff
changeset
|
93 DWORD TailLength; |
74b2a52bc3c9
TransmitPackets(), ConnectEx(), and DisconnectEx()
Igor Sysoev <igor@sysoev.ru>
parents:
501
diff
changeset
|
94 } TRANSMIT_FILE_BUFFERS, *PTRANSMIT_FILE_BUFFERS, FAR *LPTRANSMIT_FILE_BUFFERS; |
74b2a52bc3c9
TransmitPackets(), ConnectEx(), and DisconnectEx()
Igor Sysoev <igor@sysoev.ru>
parents:
501
diff
changeset
|
95 |
74b2a52bc3c9
TransmitPackets(), ConnectEx(), and DisconnectEx()
Igor Sysoev <igor@sysoev.ru>
parents:
501
diff
changeset
|
96 #endif |
282
30310107dbc9
nginx-0.0.2-2004-03-09-22:47:07 import
Igor Sysoev <igor@sysoev.ru>
parents:
186
diff
changeset
|
97 |
30310107dbc9
nginx-0.0.2-2004-03-09-22:47:07 import
Igor Sysoev <igor@sysoev.ru>
parents:
186
diff
changeset
|
98 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
|
99 IN SOCKET hSocket, |
30310107dbc9
nginx-0.0.2-2004-03-09-22:47:07 import
Igor Sysoev <igor@sysoev.ru>
parents:
186
diff
changeset
|
100 IN HANDLE hFile, |
30310107dbc9
nginx-0.0.2-2004-03-09-22:47:07 import
Igor Sysoev <igor@sysoev.ru>
parents:
186
diff
changeset
|
101 IN DWORD nNumberOfBytesToWrite, |
30310107dbc9
nginx-0.0.2-2004-03-09-22:47:07 import
Igor Sysoev <igor@sysoev.ru>
parents:
186
diff
changeset
|
102 IN DWORD nNumberOfBytesPerSend, |
30310107dbc9
nginx-0.0.2-2004-03-09-22:47:07 import
Igor Sysoev <igor@sysoev.ru>
parents:
186
diff
changeset
|
103 IN LPOVERLAPPED lpOverlapped, |
30310107dbc9
nginx-0.0.2-2004-03-09-22:47:07 import
Igor Sysoev <igor@sysoev.ru>
parents:
186
diff
changeset
|
104 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
|
105 IN DWORD dwReserved |
30310107dbc9
nginx-0.0.2-2004-03-09-22:47:07 import
Igor Sysoev <igor@sysoev.ru>
parents:
186
diff
changeset
|
106 ); |
30310107dbc9
nginx-0.0.2-2004-03-09-22:47:07 import
Igor Sysoev <igor@sysoev.ru>
parents:
186
diff
changeset
|
107 |
1633
74b2a52bc3c9
TransmitPackets(), ConnectEx(), and DisconnectEx()
Igor Sysoev <igor@sysoev.ru>
parents:
501
diff
changeset
|
108 #define WSAID_TRANSMITFILE \ |
74b2a52bc3c9
TransmitPackets(), ConnectEx(), and DisconnectEx()
Igor Sysoev <igor@sysoev.ru>
parents:
501
diff
changeset
|
109 {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
|
110 |
30310107dbc9
nginx-0.0.2-2004-03-09-22:47:07 import
Igor Sysoev <igor@sysoev.ru>
parents:
186
diff
changeset
|
111 #endif |
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 #ifndef WSAID_TRANSMITPACKETS |
74b2a52bc3c9
TransmitPackets(), ConnectEx(), and DisconnectEx()
Igor Sysoev <igor@sysoev.ru>
parents:
501
diff
changeset
|
115 |
74b2a52bc3c9
TransmitPackets(), ConnectEx(), and DisconnectEx()
Igor Sysoev <igor@sysoev.ru>
parents:
501
diff
changeset
|
116 /* 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
|
117 |
74b2a52bc3c9
TransmitPackets(), ConnectEx(), and DisconnectEx()
Igor Sysoev <igor@sysoev.ru>
parents:
501
diff
changeset
|
118 #ifndef TP_ELEMENT_FILE |
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 #ifdef _MSC_VER |
74b2a52bc3c9
TransmitPackets(), ConnectEx(), and DisconnectEx()
Igor Sysoev <igor@sysoev.ru>
parents:
501
diff
changeset
|
121 #pragma warning(disable:4201) /* Nonstandard extension, nameless struct/union */ |
74b2a52bc3c9
TransmitPackets(), ConnectEx(), and DisconnectEx()
Igor Sysoev <igor@sysoev.ru>
parents:
501
diff
changeset
|
122 #endif |
74b2a52bc3c9
TransmitPackets(), ConnectEx(), and DisconnectEx()
Igor Sysoev <igor@sysoev.ru>
parents:
501
diff
changeset
|
123 |
1679
ca317d9b5c09
style fix: remove trailing spaces
Igor Sysoev <igor@sysoev.ru>
parents:
1633
diff
changeset
|
124 typedef struct _TRANSMIT_PACKETS_ELEMENT { |
ca317d9b5c09
style fix: remove trailing spaces
Igor Sysoev <igor@sysoev.ru>
parents:
1633
diff
changeset
|
125 ULONG dwElFlags; |
1633
74b2a52bc3c9
TransmitPackets(), ConnectEx(), and DisconnectEx()
Igor Sysoev <igor@sysoev.ru>
parents:
501
diff
changeset
|
126 #define TP_ELEMENT_MEMORY 1 |
74b2a52bc3c9
TransmitPackets(), ConnectEx(), and DisconnectEx()
Igor Sysoev <igor@sysoev.ru>
parents:
501
diff
changeset
|
127 #define TP_ELEMENT_FILE 2 |
74b2a52bc3c9
TransmitPackets(), ConnectEx(), and DisconnectEx()
Igor Sysoev <igor@sysoev.ru>
parents:
501
diff
changeset
|
128 #define TP_ELEMENT_EOP 4 |
1679
ca317d9b5c09
style fix: remove trailing spaces
Igor Sysoev <igor@sysoev.ru>
parents:
1633
diff
changeset
|
129 ULONG cLength; |
1633
74b2a52bc3c9
TransmitPackets(), ConnectEx(), and DisconnectEx()
Igor Sysoev <igor@sysoev.ru>
parents:
501
diff
changeset
|
130 union { |
74b2a52bc3c9
TransmitPackets(), ConnectEx(), and DisconnectEx()
Igor Sysoev <igor@sysoev.ru>
parents:
501
diff
changeset
|
131 struct { |
74b2a52bc3c9
TransmitPackets(), ConnectEx(), and DisconnectEx()
Igor Sysoev <igor@sysoev.ru>
parents:
501
diff
changeset
|
132 LARGE_INTEGER nFileOffset; |
74b2a52bc3c9
TransmitPackets(), ConnectEx(), and DisconnectEx()
Igor Sysoev <igor@sysoev.ru>
parents:
501
diff
changeset
|
133 HANDLE hFile; |
74b2a52bc3c9
TransmitPackets(), ConnectEx(), and DisconnectEx()
Igor Sysoev <igor@sysoev.ru>
parents:
501
diff
changeset
|
134 }; |
74b2a52bc3c9
TransmitPackets(), ConnectEx(), and DisconnectEx()
Igor Sysoev <igor@sysoev.ru>
parents:
501
diff
changeset
|
135 PVOID pBuffer; |
74b2a52bc3c9
TransmitPackets(), ConnectEx(), and DisconnectEx()
Igor Sysoev <igor@sysoev.ru>
parents:
501
diff
changeset
|
136 }; |
74b2a52bc3c9
TransmitPackets(), ConnectEx(), and DisconnectEx()
Igor Sysoev <igor@sysoev.ru>
parents:
501
diff
changeset
|
137 } TRANSMIT_PACKETS_ELEMENT, *PTRANSMIT_PACKETS_ELEMENT, |
74b2a52bc3c9
TransmitPackets(), ConnectEx(), and DisconnectEx()
Igor Sysoev <igor@sysoev.ru>
parents:
501
diff
changeset
|
138 FAR *LPTRANSMIT_PACKETS_ELEMENT; |
74b2a52bc3c9
TransmitPackets(), ConnectEx(), and DisconnectEx()
Igor Sysoev <igor@sysoev.ru>
parents:
501
diff
changeset
|
139 |
74b2a52bc3c9
TransmitPackets(), ConnectEx(), and DisconnectEx()
Igor Sysoev <igor@sysoev.ru>
parents:
501
diff
changeset
|
140 #ifdef _MSC_VER |
74b2a52bc3c9
TransmitPackets(), ConnectEx(), and DisconnectEx()
Igor Sysoev <igor@sysoev.ru>
parents:
501
diff
changeset
|
141 #pragma warning(default:4201) |
74b2a52bc3c9
TransmitPackets(), ConnectEx(), and DisconnectEx()
Igor Sysoev <igor@sysoev.ru>
parents:
501
diff
changeset
|
142 #endif |
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 #endif |
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 typedef BOOL (PASCAL FAR * LPFN_TRANSMITPACKETS) ( |
1679
ca317d9b5c09
style fix: remove trailing spaces
Igor Sysoev <igor@sysoev.ru>
parents:
1633
diff
changeset
|
147 SOCKET hSocket, |
ca317d9b5c09
style fix: remove trailing spaces
Igor Sysoev <igor@sysoev.ru>
parents:
1633
diff
changeset
|
148 TRANSMIT_PACKETS_ELEMENT *lpPacketArray, |
ca317d9b5c09
style fix: remove trailing spaces
Igor Sysoev <igor@sysoev.ru>
parents:
1633
diff
changeset
|
149 DWORD nElementCount, |
ca317d9b5c09
style fix: remove trailing spaces
Igor Sysoev <igor@sysoev.ru>
parents:
1633
diff
changeset
|
150 DWORD nSendSize, |
ca317d9b5c09
style fix: remove trailing spaces
Igor Sysoev <igor@sysoev.ru>
parents:
1633
diff
changeset
|
151 LPOVERLAPPED lpOverlapped, |
ca317d9b5c09
style fix: remove trailing spaces
Igor Sysoev <igor@sysoev.ru>
parents:
1633
diff
changeset
|
152 DWORD dwFlags |
1633
74b2a52bc3c9
TransmitPackets(), ConnectEx(), and DisconnectEx()
Igor Sysoev <igor@sysoev.ru>
parents:
501
diff
changeset
|
153 ); |
74b2a52bc3c9
TransmitPackets(), ConnectEx(), and DisconnectEx()
Igor Sysoev <igor@sysoev.ru>
parents:
501
diff
changeset
|
154 |
74b2a52bc3c9
TransmitPackets(), ConnectEx(), and DisconnectEx()
Igor Sysoev <igor@sysoev.ru>
parents:
501
diff
changeset
|
155 #define WSAID_TRANSMITPACKETS \ |
74b2a52bc3c9
TransmitPackets(), ConnectEx(), and DisconnectEx()
Igor Sysoev <igor@sysoev.ru>
parents:
501
diff
changeset
|
156 {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
|
157 |
74b2a52bc3c9
TransmitPackets(), ConnectEx(), and DisconnectEx()
Igor Sysoev <igor@sysoev.ru>
parents:
501
diff
changeset
|
158 #endif |
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 #ifndef WSAID_CONNECTEX |
74b2a52bc3c9
TransmitPackets(), ConnectEx(), and DisconnectEx()
Igor Sysoev <igor@sysoev.ru>
parents:
501
diff
changeset
|
162 |
74b2a52bc3c9
TransmitPackets(), ConnectEx(), and DisconnectEx()
Igor Sysoev <igor@sysoev.ru>
parents:
501
diff
changeset
|
163 typedef BOOL (PASCAL FAR * LPFN_CONNECTEX) ( |
74b2a52bc3c9
TransmitPackets(), ConnectEx(), and DisconnectEx()
Igor Sysoev <igor@sysoev.ru>
parents:
501
diff
changeset
|
164 IN SOCKET s, |
74b2a52bc3c9
TransmitPackets(), ConnectEx(), and DisconnectEx()
Igor Sysoev <igor@sysoev.ru>
parents:
501
diff
changeset
|
165 IN const struct sockaddr FAR *name, |
74b2a52bc3c9
TransmitPackets(), ConnectEx(), and DisconnectEx()
Igor Sysoev <igor@sysoev.ru>
parents:
501
diff
changeset
|
166 IN int namelen, |
74b2a52bc3c9
TransmitPackets(), ConnectEx(), and DisconnectEx()
Igor Sysoev <igor@sysoev.ru>
parents:
501
diff
changeset
|
167 IN PVOID lpSendBuffer OPTIONAL, |
74b2a52bc3c9
TransmitPackets(), ConnectEx(), and DisconnectEx()
Igor Sysoev <igor@sysoev.ru>
parents:
501
diff
changeset
|
168 IN DWORD dwSendDataLength, |
74b2a52bc3c9
TransmitPackets(), ConnectEx(), and DisconnectEx()
Igor Sysoev <igor@sysoev.ru>
parents:
501
diff
changeset
|
169 OUT LPDWORD lpdwBytesSent, |
74b2a52bc3c9
TransmitPackets(), ConnectEx(), and DisconnectEx()
Igor Sysoev <igor@sysoev.ru>
parents:
501
diff
changeset
|
170 IN LPOVERLAPPED lpOverlapped |
74b2a52bc3c9
TransmitPackets(), ConnectEx(), and DisconnectEx()
Igor Sysoev <igor@sysoev.ru>
parents:
501
diff
changeset
|
171 ); |
74b2a52bc3c9
TransmitPackets(), ConnectEx(), and DisconnectEx()
Igor Sysoev <igor@sysoev.ru>
parents:
501
diff
changeset
|
172 |
74b2a52bc3c9
TransmitPackets(), ConnectEx(), and DisconnectEx()
Igor Sysoev <igor@sysoev.ru>
parents:
501
diff
changeset
|
173 #define WSAID_CONNECTEX \ |
74b2a52bc3c9
TransmitPackets(), ConnectEx(), and DisconnectEx()
Igor Sysoev <igor@sysoev.ru>
parents:
501
diff
changeset
|
174 {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
|
175 |
74b2a52bc3c9
TransmitPackets(), ConnectEx(), and DisconnectEx()
Igor Sysoev <igor@sysoev.ru>
parents:
501
diff
changeset
|
176 #endif |
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 #ifndef WSAID_DISCONNECTEX |
74b2a52bc3c9
TransmitPackets(), ConnectEx(), and DisconnectEx()
Igor Sysoev <igor@sysoev.ru>
parents:
501
diff
changeset
|
180 |
74b2a52bc3c9
TransmitPackets(), ConnectEx(), and DisconnectEx()
Igor Sysoev <igor@sysoev.ru>
parents:
501
diff
changeset
|
181 typedef BOOL (PASCAL FAR * LPFN_DISCONNECTEX) ( |
74b2a52bc3c9
TransmitPackets(), ConnectEx(), and DisconnectEx()
Igor Sysoev <igor@sysoev.ru>
parents:
501
diff
changeset
|
182 IN SOCKET s, |
74b2a52bc3c9
TransmitPackets(), ConnectEx(), and DisconnectEx()
Igor Sysoev <igor@sysoev.ru>
parents:
501
diff
changeset
|
183 IN LPOVERLAPPED lpOverlapped, |
74b2a52bc3c9
TransmitPackets(), ConnectEx(), and DisconnectEx()
Igor Sysoev <igor@sysoev.ru>
parents:
501
diff
changeset
|
184 IN DWORD dwFlags, |
74b2a52bc3c9
TransmitPackets(), ConnectEx(), and DisconnectEx()
Igor Sysoev <igor@sysoev.ru>
parents:
501
diff
changeset
|
185 IN DWORD dwReserved |
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 |
74b2a52bc3c9
TransmitPackets(), ConnectEx(), and DisconnectEx()
Igor Sysoev <igor@sysoev.ru>
parents:
501
diff
changeset
|
188 #define WSAID_DISCONNECTEX \ |
74b2a52bc3c9
TransmitPackets(), ConnectEx(), and DisconnectEx()
Igor Sysoev <igor@sysoev.ru>
parents:
501
diff
changeset
|
189 {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
|
190 |
74b2a52bc3c9
TransmitPackets(), ConnectEx(), and DisconnectEx()
Igor Sysoev <igor@sysoev.ru>
parents:
501
diff
changeset
|
191 #endif |
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 extern LPFN_ACCEPTEX ngx_acceptex; |
74b2a52bc3c9
TransmitPackets(), ConnectEx(), and DisconnectEx()
Igor Sysoev <igor@sysoev.ru>
parents:
501
diff
changeset
|
195 extern LPFN_GETACCEPTEXSOCKADDRS ngx_getacceptexsockaddrs; |
74b2a52bc3c9
TransmitPackets(), ConnectEx(), and DisconnectEx()
Igor Sysoev <igor@sysoev.ru>
parents:
501
diff
changeset
|
196 extern LPFN_TRANSMITFILE ngx_transmitfile; |
74b2a52bc3c9
TransmitPackets(), ConnectEx(), and DisconnectEx()
Igor Sysoev <igor@sysoev.ru>
parents:
501
diff
changeset
|
197 extern LPFN_TRANSMITPACKETS ngx_transmitpackets; |
74b2a52bc3c9
TransmitPackets(), ConnectEx(), and DisconnectEx()
Igor Sysoev <igor@sysoev.ru>
parents:
501
diff
changeset
|
198 extern LPFN_CONNECTEX ngx_connectex; |
74b2a52bc3c9
TransmitPackets(), ConnectEx(), and DisconnectEx()
Igor Sysoev <igor@sysoev.ru>
parents:
501
diff
changeset
|
199 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
|
200 |
8
708f8bb772ec
nginx-0.0.1-2002-09-02-18:48:24 import
Igor Sysoev <igor@sysoev.ru>
parents:
6
diff
changeset
|
201 |
501 | 202 int ngx_tcp_push(ngx_socket_t s); |
1633
74b2a52bc3c9
TransmitPackets(), ConnectEx(), and DisconnectEx()
Igor Sysoev <igor@sysoev.ru>
parents:
501
diff
changeset
|
203 #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
|
204 |
6dfda4cf5200
nginx-0.0.1-2003-06-11-19:28:34 import
Igor Sysoev <igor@sysoev.ru>
parents:
100
diff
changeset
|
205 |
2
ffffe1499bce
nginx-0.0.1-2002-08-16-19:27:03 import
Igor Sysoev <igor@sysoev.ru>
parents:
diff
changeset
|
206 #endif /* _NGX_SOCKET_H_INCLUDED_ */ |