GClasses
|
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.)
#include <GSocket.h>
Public Member Functions | |
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... | |
Protected Attributes | |
SOCKET | m_sock |
|
inline |
|
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.)
|
inline |
Sets the socket for this connection.
|
inline |
Returns the socket associated with this connection.
|
protected |