9#if !defined(OWL_WINSOCK_H)
13#if defined(BI_HAS_PRAGMA_ONCE)
58 static SOCKET
accept(SOCKET s,
struct sockaddr * addr,
60 static int bind(SOCKET s,
struct sockaddr * addr,
int nameLen);
62 static int connect(SOCKET s,
struct sockaddr * name,
int nameLen);
63 static int getpeername(SOCKET s,
struct sockaddr * name,
65 static int getsockname(SOCKET s,
struct sockaddr * name,
67 static int getsockopt(SOCKET s,
int level,
int optName,
char * optVal,
72 static char *
inet_ntoa(
struct in_addr in);
74 static int listen(SOCKET s,
int backlog);
77 static int recv(SOCKET s,
char * buf,
int len,
int flags);
78 static int recvfrom(SOCKET s,
char * buf,
int len,
int flags,
79 struct sockaddr * from,
int* fromLen);
80 static int select(
int nfds,
struct fd_set * readfds,
81 struct fd_set * writefds,
82 struct fd_set * exceptfds,
83 const struct timeval * timeout);
84 static int send(SOCKET s, LPCSTR buf,
int len,
int flags);
85 static int sendto(SOCKET s, LPCSTR buf,
int len,
int flags,
86 const struct sockaddr * to,
int toLen);
87 static int setsockopt(SOCKET s,
int level,
int optName,
88 LPCSTR optVal,
int optLen);
89 static int shutdown(SOCKET s,
int how);
90 static SOCKET
socket(
int af,
int type,
int protocol);
94 static struct hostent *
gethostbyaddr(LPCSTR addr,
int len,
int type);
97 static struct servent *
getservbyname(LPCSTR name, LPCSTR proto);
98 static struct servent *
getservbyport(
int port, LPCSTR proto);
113 LPCSTR proto,
char * buf,
int bufLen);
115 LPCSTR proto,
char * buf,
int bufLen);
117 char * buf,
int bufLen);
119 char * buf,
int bufLen);
121 char * buf,
int bufLen);
123 int len,
int type,
char * buf,
int bufLen);
126 static int WSARecvEx(SOCKET s,
char * buf,
int len,
int * flags);
The TWinSockDll class encapsulates the WinSock DLL (WINSOCK.DLL).
static int getpeername(SOCKET s, struct sockaddr *name, int *nameLen)
static struct hostent * gethostbyname(LPCSTR name)
static ulong inet_addr(const char *cp)
static int getsockname(SOCKET s, struct sockaddr *name, int *nameLen)
static int select(int nfds, struct fd_set *readfds, struct fd_set *writefds, struct fd_set *exceptfds, const struct timeval *timeout)
static BOOL WSAIsBlocking(void)
static HANDLE WSAAsyncGetServByPort(HWND hWnd, uint msg, int port, LPCSTR proto, char *buf, int bufLen)
static struct servent * getservbyname(LPCSTR name, LPCSTR proto)
static struct protoent * getprotobyname(LPCSTR name)
static FARPROC WSASetBlockingHook(FARPROC blockFunc)
static int ioctlsocket(SOCKET s, long cmd, ulong *argp)
static int setsockopt(SOCKET s, int level, int optName, LPCSTR optVal, int optLen)
static ushort _ntohs(ushort netShort)
static ulong _ntohl(ulong netLong)
static HANDLE WSAAsyncGetHostByAddr(HWND hWnd, uint msg, LPCSTR addr, int len, int type, char *buf, int bufLen)
static int gethostname(char *name, int nameLen)
static HANDLE WSAAsyncGetHostByName(HWND hWnd, uint msg, LPCSTR name, char *buf, int bufLen)
static struct hostent * gethostbyaddr(LPCSTR addr, int len, int type)
static int shutdown(SOCKET s, int how)
static int WSAUnhookBlockingHook(void)
static SOCKET socket(int af, int type, int protocol)
static int sendto(SOCKET s, LPCSTR buf, int len, int flags, const struct sockaddr *to, int toLen)
static int listen(SOCKET s, int backlog)
static int WSACancelBlockingCall(void)
static int WSAGetLastError(void)
static int WSACancelAsyncRequest(HANDLE hTaskHandle)
static struct servent * getservbyport(int port, LPCSTR proto)
static int WSAStartup(uint16 versionRequested, LPWSADATA WSAData)
static SOCKET accept(SOCKET s, struct sockaddr *addr, int *addrLen)
static int WSACleanup(void)
static HANDLE WSAAsyncGetProtoByName(HWND hWnd, uint msg, LPCSTR name, char *buf, int bufLen)
static ushort _htons(ushort hostShort)
static struct protoent * getprotobynumber(int proto)
static int closesocket(SOCKET s)
static int bind(SOCKET s, struct sockaddr *addr, int nameLen)
static int connect(SOCKET s, struct sockaddr *name, int nameLen)
static char * inet_ntoa(struct in_addr in)
static int getsockopt(SOCKET s, int level, int optName, char *optVal, int *optLen)
static HANDLE WSAAsyncGetServByName(HWND hWnd, uint msg, LPCSTR name, LPCSTR proto, char *buf, int bufLen)
static int send(SOCKET s, LPCSTR buf, int len, int flags)
static void WSASetLastError(int error)
static ulong _htonl(ulong hostLong)
static int WSARecvEx(SOCKET s, char *buf, int len, int *flags)
static HANDLE WSAAsyncGetProtoByNumber(HWND hWnd, uint msg, int number, char *buf, int bufLen)
static TModule & WinSockModule()
static int recvfrom(SOCKET s, char *buf, int len, int flags, struct sockaddr *from, int *fromLen)
static int recv(SOCKET s, char *buf, int len, int flags)
static int WSAAsyncSelect(SOCKET s, HWND hWnd, uint msg, long event)
static bool IsAvailable()
TWinSock is an alias for an instance of the TDllLoader template which ensures the underlying DLL is l...
static bool IsAvailable(void)
Returns true if the DLL implementing WinSock is available and loaded, or false otherwise.
static TWinSockDll * Dll(void)
TModule(const tstring &name, bool shouldLoad=true, bool mustLoad=true, bool addToList=true)
Constructs a TModule object that is used as an alias for a DLL.
Definition of class TModule.
Object Windows Library (OWLNext Core).
Main header of the Winsock OWL subsystem.
Winsock for OWL subsystem.
Winsock for OWL subsystem.
Winsock for OWL subsystem.
Winsock for OWL subsystem.
Winsock for OWL subsystem.
Winsock for OWL subsystem.
Winsock for OWL subsystem.