#include <io.h>
Go to the source code of this file.
Defines | |
| #define | read read_not_used |
| #define | write write_not_used |
| #define | F_GETFL 0 |
| #define | F_SETFL 1 |
| #define | O_NONBLOCK 1 |
| #define | accept windows_accept |
| #define | inet_pton windows_inet_pton |
| #define | inet_ntop windows_inet_ntop |
Functions | |
| CoreExport int | read (int fd, char *buf, size_t count) |
| CoreExport int | write (int fd, const char *buf, size_t count) |
| CoreExport int | windows_close (int fd) |
| CoreExport int | windows_accept (int fd, struct sockaddr *addr, int *addrlen) |
| CoreExport int | windows_inet_pton (int af, const char *src, void *dst) |
| CoreExport const char * | windows_inet_ntop (int af, const void *src, char *dst, size_t size) |
| CoreExport int | fcntl (int fd, int cmd, int arg) |
| #define accept windows_accept |
Definition at line 28 of file socket.h.
Referenced by SocketIO::Accept(), SSLSocketIO::Accept(), pipe(), and windows_accept().
| #define F_GETFL 0 |
Definition at line 14 of file socket.h.
Referenced by fcntl(), Pipe::Pipe(), Socket::SetBlocking(), and Pipe::SetWriteBlocking().
| #define F_SETFL 1 |
Definition at line 15 of file socket.h.
Referenced by fcntl(), Pipe::Pipe(), Socket::SetBlocking(), and Pipe::SetWriteBlocking().
| #define inet_ntop windows_inet_ntop |
Definition at line 30 of file socket.h.
Referenced by sockaddrs::addr(), and sockaddrs::ntop().
| #define inet_pton windows_inet_pton |
Definition at line 29 of file socket.h.
Referenced by sockaddrs::pton().
| #define O_NONBLOCK 1 |
Definition at line 17 of file socket.h.
Referenced by fcntl(), Pipe::Pipe(), Socket::SetBlocking(), and Pipe::SetWriteBlocking().
| #define read read_not_used |
Definition at line 8 of file socket.h.
Referenced by StaticFileServer::OnRequest(), Pipe::ProcessRead(), Pipe::Read(), and TemplateFileServer::Serve().
| #define write write_not_used |
Definition at line 9 of file socket.h.
Referenced by Pipe::Write().
| CoreExport int fcntl | ( | int | fd, | |
| int | cmd, | |||
| int | arg | |||
| ) |
Definition at line 131 of file socket.cpp.
References F_GETFL, F_SETFL, and O_NONBLOCK.
Referenced by Pipe::Pipe(), Socket::SetBlocking(), and Pipe::SetWriteBlocking().
| CoreExport int read | ( | int | fd, | |
| char * | buf, | |||
| size_t | count | |||
| ) |
Definition at line 18 of file socket.cpp.
References is_socket().
| CoreExport int windows_accept | ( | int | fd, | |
| struct sockaddr * | addr, | |||
| int * | addrlen | |||
| ) |
Definition at line 42 of file socket.cpp.
References accept.
| CoreExport int windows_close | ( | int | fd | ) |
Definition at line 34 of file socket.cpp.
References is_socket().
| CoreExport const char* windows_inet_ntop | ( | int | af, | |
| const void * | src, | |||
| char * | dst, | |||
| size_t | size | |||
| ) |
This is inet_ntop, but it works on Windows
| af | The protocol type, AF_INET or AF_INET6 | |
| src | Network address structure | |
| dst | After converting put it here | |
| size | sizeof the dest |
Definition at line 99 of file socket.cpp.
| CoreExport int windows_inet_pton | ( | int | af, | |
| const char * | src, | |||
| void * | dst | |||
| ) |
This is inet_pton, but it works on Windows
| af | The protocol type, AF_INET or AF_INET6 | |
| src | The address | |
| dst | Struct to put results in |
Definition at line 56 of file socket.cpp.
| CoreExport int write | ( | int | fd, | |
| const char * | buf, | |||
| size_t | count | |||
| ) |
Definition at line 26 of file socket.cpp.
References is_socket().
1.7.1