public abstract class Connection
extends java.lang.Object
| Constructor and Description |
|---|
Connection() |
| Modifier and Type | Method and Description |
|---|---|
void |
connect(java.net.InetSocketAddress endPoint)
Connects to the specified end point.
|
abstract void |
connect(java.net.InetSocketAddress endPoint,
int timeout)
Connects to the specified end point.
|
abstract void |
disconnect()
Disconnects this instance.
|
Event<EventArgs> |
getConnected() |
abstract java.net.InetSocketAddress |
getCurrentEndPoint() |
Event<DisconnectedEventArgs> |
getDisconnected() |
abstract java.net.InetAddress |
getLocalIP()
Gets the local IP.
|
Event<NetMsgEventArgs> |
getNetMsgReceived() |
abstract ProtocolTypes |
getProtocolTypes() |
abstract void |
send(byte[] data)
Sends the specified data packet.
|
public abstract void connect(java.net.InetSocketAddress endPoint,
int timeout)
endPoint - The end point to connect to.timeout - Timeout in millisecondspublic final void connect(java.net.InetSocketAddress endPoint)
endPoint - The end point to connect to.public abstract void disconnect()
public abstract void send(byte[] data)
data - The data packet to send.public abstract java.net.InetAddress getLocalIP()
public abstract java.net.InetSocketAddress getCurrentEndPoint()
public abstract ProtocolTypes getProtocolTypes()
public Event<NetMsgEventArgs> getNetMsgReceived()
public Event<DisconnectedEventArgs> getDisconnected()