nginx-quic/src/os/win32/ngx_socket.h

40 lines
953 B
C
Raw Normal View History

2002-08-16 11:27:03 -04:00
#ifndef _NGX_SOCKET_H_INCLUDED_
#define _NGX_SOCKET_H_INCLUDED_
#include <ngx_config.h>
2003-06-03 11:42:58 -04:00
#include <ngx_core.h>
2002-08-16 11:27:03 -04:00
2002-09-16 11:01:44 -04:00
#define NGX_WRITE_SHUTDOWN SD_SEND
2002-09-02 10:48:24 -04:00
#define INET_ADDRSTRLEN 16
2002-08-20 10:48:28 -04:00
typedef SOCKET ngx_socket_t;
2002-09-02 10:48:24 -04:00
typedef int socklen_t;
2002-08-16 11:27:03 -04:00
2002-08-26 11:18:19 -04:00
#define ngx_socket(af, type, proto, flags) \
WSASocket(af, type, proto, NULL, 0, flags)
#define ngx_socket_n "WSASocket()"
2002-09-02 10:48:24 -04:00
int ngx_nonblocking(ngx_socket_t s);
2003-02-06 14:21:13 -03:00
int ngx_blocking(ngx_socket_t s);
2002-08-26 11:18:19 -04:00
#define ngx_nonblocking_n "ioctlsocket(FIONBIO)"
2003-02-06 14:21:13 -03:00
#define ngx_blocking_n "ioctlsocket(!FIONBIO)"
2002-08-16 11:27:03 -04:00
2002-09-16 11:01:44 -04:00
#define ngx_shutdown_socket shutdown
#define ngx_shutdown_socket_n "shutdown()"
2002-08-20 10:48:28 -04:00
#define ngx_close_socket closesocket
2002-08-26 11:18:19 -04:00
#define ngx_close_socket_n "closesocket()"
2002-08-16 11:27:03 -04:00
2003-02-06 14:21:13 -03:00
extern LPFN_ACCEPTEX acceptex;
extern LPFN_GETACCEPTEXSOCKADDRS getacceptexsockaddrs;
extern LPFN_TRANSMITFILE transmitfile;
2002-09-02 10:48:24 -04:00
2002-08-16 11:27:03 -04:00
#endif /* _NGX_SOCKET_H_INCLUDED_ */