This class is used by GTCPServer to represent a connection with one of the clients. (If you want to associate some additional objects with each connection, you can inherrit from this class, and overload GTCPServer::makeConnection to return your own custom object.)
More...
#include <GSocket.h>
|
| | GTCPConnection (SOCKET sock) |
| |
| virtual | ~GTCPConnection () |
| |
| in_addr | ipAddr () |
| | Returns the client's IP address for this connection. (You can use inet_ntoa to convert the value this returns to a string.) More...
|
| |
| void | setSocket (SOCKET sock) |
| | Sets the socket for this connection. More...
|
| |
| SOCKET | socket () |
| | Returns the socket associated with this connection. More...
|
| |
This class is used by GTCPServer to represent a connection with one of the clients. (If you want to associate some additional objects with each connection, you can inherrit from this class, and overload GTCPServer::makeConnection to return your own custom object.)
| GClasses::GTCPConnection::GTCPConnection |
( |
SOCKET |
sock | ) |
|
|
inline |
| virtual GClasses::GTCPConnection::~GTCPConnection |
( |
| ) |
|
|
inlinevirtual |
| in_addr GClasses::GTCPConnection::ipAddr |
( |
| ) |
|
Returns the client's IP address for this connection. (You can use inet_ntoa to convert the value this returns to a string.)
| void GClasses::GTCPConnection::setSocket |
( |
SOCKET |
sock | ) |
|
|
inline |
Sets the socket for this connection.
| SOCKET GClasses::GTCPConnection::socket |
( |
| ) |
|
|
inline |
Returns the socket associated with this connection.
| SOCKET GClasses::GTCPConnection::m_sock |
|
protected |