#include <BWinSock.h>
Inheritance diagram for CBWinSock:
Public Member Functions | |
bool | Connect (const int8 *address, uint16 port) |
Connect. | |
bool | HostOnPort (uint16 port) |
HostOnPort. | |
bool | BindToPort (uint16 port) |
BindToPort. | |
void | Close () |
Close. | |
CBSock * | Accept () |
Accept. | |
int32 | GetLastError () |
GetLastError. | |
Protected Member Functions | |
uint64 | SetBlockingMode (bool bBlock) |
SetBlockingMode. | |
int32 | Recv (char *buf, uint32 len, int32 flags, struct sockaddr *from=NULL, int *fromlen=NULL) |
Recv. | |
int32 | Send (const char *msg, uint32 len, int32 flags, struct sockaddr *to=NULL, int tolen=0) |
Send. | |
uint64 | GetPendingBytes () |
GetPendingBytes. |
Description: A buffered socket class for Windows
Limitations: None
|
Accept. Description: Accepts an incoming connection.
Implements CBSock. |
|
BindToPort. Description: Binds a socket to a port.
Implements CBSock. |
|
Close. Description: Closes a socket.
Implements CBSock. |
|
Connect. Description: Connects to a server listening on port.
Implements CBSock. |
|
GetLastError. Description: Returns the last error code.
Implements CBSock. |
|
GetPendingBytes. Description: This function gets the number of bytes pending on the socket
Implements CBSock. |
|
HostOnPort. Description: Sets up a server socket to listen on the specified port.
Implements CBSock. |
|
Recv. Description: This function receives data from the specified socket
Implements CBSock. |
|
Send. Description: This function sends data over the specified socket
Implements CBSock. |
|
SetBlockingMode. Description: This function sets the blocking mode of the socket. When in blocking mode, functions like accept and read will not return until the function comletes the expected operation. In non-blocking mode, the functions will simply return if the resources are not avaiable.
Implements CBSock. |