TCPObject Class Reference
[Platform]
Allows communications between the game and a server using TCP/IP protocols.
More...
List of all members.
Public Member Functions |
| void | connect (string address) |
| | Connect to the given address.
|
| void | disconnect () |
| | Disconnect from whatever this TCPObject is currently connected to, if anything.
|
| void | listen (int port) |
| | Start listening on the specified port for connections.
|
| void | send (string data) |
| | Transmits the data string to the server.
|
|
|
| void | onConnected () |
| | Called whenever a connection is established with a server.
|
| void | onConnectFailed () |
| | Called whenever a connection has failed to be established with a server.
|
| void | onConnectionRequest (string address, string ID) |
| | Called whenever a connection request is made.
|
| void | onDisconnect () |
| | Called whenever the TCPObject disconnects from whatever it is currently connected to.
|
| void | onDNSFailed () |
| | Called whenever the DNS has failed to resolve.
|
| void | onDNSResolved () |
| | Called whenever the DNS has been resolved.
|
| void | onLine (string line) |
| | Called whenever a line of data is sent from the server connected to this TCPObject to the game client.
|
Detailed Description
Allows communications between the game and a server using TCP/IP protocols.
- Example:
-
Member Function Documentation
| void TCPObject::onConnected |
( |
|
) |
|
Called whenever a connection is established with a server.
| void TCPObject::onConnectFailed |
( |
|
) |
|
Called whenever a connection has failed to be established with a server.
| void TCPObject::onConnectionRequest |
( |
string |
address, |
|
|
string |
ID | |
|
) |
| | |
Called whenever a connection request is made.
- Parameters:
-
| address | Server address to connect to. |
| ID | Connection ID |
| void TCPObject::onDisconnect |
( |
|
) |
|
Called whenever the TCPObject disconnects from whatever it is currently connected to.
| void TCPObject::onDNSFailed |
( |
|
) |
|
Called whenever the DNS has failed to resolve.
| void TCPObject::onDNSResolved |
( |
|
) |
|
Called whenever the DNS has been resolved.
| void TCPObject::onLine |
( |
string |
line |
) |
|
Called whenever a line of data is sent from the server connected to this TCPObject to the game client.
- Parameters:
-
| line | Data sent from the server. |