
#include <gzDistTransport.h>
Inheritance diagram for gzDistTransportTCP:

Public Member Functions | |
| gzDistTransportTCP (gzULong sendBuffer=GZ_DIST_DEFAULT_SEND_SOCKET_BUFFER, gzULong recvBuffer=GZ_DIST_DEFAULT_RECV_SOCKET_BUFFER) | |
| Constructor. | |
| virtual | ~gzDistTransportTCP () |
| Destructor. | |
| gzBool | createClient (const gzSocketAddress &remoteAddress) |
| Setup TCP client. | |
| gzBool | createClient (gzSocket *connection) |
| Setup TCP client. | |
| gzBool | createServer (gzUShort listenPort, const gzHostAddress &interfaceAddress=gzHostAddress(0, 0, 0, 0)) |
| Setup TCP server. | |
| gzBool | open () |
| Open transport. | |
| gzVoid | close () |
| Close transport. | |
| gzBool | isOpen () const |
| Check if this transport is open. | |
| gzBool | isConnected () |
| Check if this transport is connected. | |
| gzBool | isServer () const |
| Check if this is a TCP server or a TCP client. | |
| gzBool | send (const gzUByte *buffer, gzULong length) |
| Send message. | |
| gzInt | receive (gzUByte *buffer, gzULong length, gzULong timeout=0) |
| Receive message. | |
| gzSocketAddress | getClientConnectAddress () |
| Get the remote address the transport is connected to. | |
| gzSocketAddress | getServerListenAddress () |
| Get the local address the server is listening on. | |
Transport using TCP/IP. Includes supports for both server and client connections. The server can accept only one connection at a time.
Definition at line 205 of file gzDistTransport.h.
|
||||||||||||
|
Constructor.
|
|
|
Setup TCP client.
|
|
|
Setup TCP client.
|
|
||||||||||||
|
Setup TCP server.
|
|
|
Check if this transport is open. Implements gzDistTransportInterface. |
|
|
Check if this transport is connected. A TCP client is always connected when it is opened. A TCP server is only connected when a remote client has connected to its socket.
Implements gzDistTransportInterface.
|
|
|
Get the remote address the transport is connected to. Valid only when connected (for both clients and servers).
|
|
|
Get the local address the server is listening on. Valid only for servers that are open. |