#include <CAVERNnet_tcp_c.hxx>
Inheritance diagram for CAVERNnet_tcpServer_c::
Public Methods | |
void | setTimeOut (int t) |
int | getTimeOut () |
Get timeout period. | |
CAVERNnet_tcpServer_c () | |
~CAVERNnet_tcpServer_c () | |
unsigned int | getSelfIP () |
Get server's IP. | |
void | getSelfIP (char *name) |
Get server's IP. | |
int | getSelfPort () |
Get server's port. | |
int | init (int port) |
void | close () |
Close the server port. | |
CAVERNnet_tcpClient_c* | checkForNewConnections () |
Static Public Attributes | |
const int | OK |
Status ok. | |
const int | FAILED |
Status failed. | |
Protected Attributes | |
int | serverPort |
int | timeOutPeriod |
int | sockfd |
struct sockaddr_in | serverInfo |
|
Check to see if there is a request from clients for connection. If yes then return a CAVERNnet_tcpClient_c object which you can then use to talk to the client.
Reimplemented in CAVERNnet_extendedTcpServer_c. |
|
Open the server on a port. Typically after this call you sit in a loop and call checkForNewConnections to wait for incoming connections.
|
|
Set timeout period when performing read() or write() operations.
|