public class TcpConnection extends Connection
| Constructor and Description |
|---|
TcpConnection() |
| Modifier and Type | Method and Description |
|---|---|
void |
connect(java.net.InetSocketAddress endPoint,
int timeout)
Connects to the specified end point.
|
void |
disconnect()
Disconnects this instance.
|
java.net.InetSocketAddress |
getCurrentEndPoint() |
java.net.InetAddress |
getLocalIP()
Gets the local IP.
|
ProtocolTypes |
getProtocolTypes() |
void |
send(byte[] data)
Sends the specified data packet.
|
connect, getConnected, getDisconnected, getNetMsgReceivedpublic void connect(java.net.InetSocketAddress endPoint,
int timeout)
Connectionconnect in class ConnectionendPoint - The end point to connect to.timeout - Timeout in millisecondspublic void disconnect()
Connectiondisconnect in class Connectionpublic void send(byte[] data)
Connectionsend in class Connectiondata - The data packet to send.public java.net.InetAddress getLocalIP()
ConnectiongetLocalIP in class Connectionpublic java.net.InetSocketAddress getCurrentEndPoint()
getCurrentEndPoint in class Connectionpublic ProtocolTypes getProtocolTypes()
getProtocolTypes in class Connection