public abstract class Connection extends Object
| Modifier and Type | Field and Description | 
|---|---|
GenericEvent | 
connected
Occurs when the physical connection is established. 
 | 
GenericEvent | 
disconnected
Occurs when the physical connection is broken. 
 | 
NetFilterEncryption | 
netFilter
The net filter. 
 | 
Event<NetMsgEventArgs> | 
netMsgReceived
Occurs when a net message is recieved over the network. 
 | 
| Constructor and Description | 
|---|
Connection()  | 
| Modifier and Type | Method and Description | 
|---|---|
abstract void | 
connect(IPEndPoint endPoint)
Connects to the specified end point. 
 | 
abstract void | 
disconnect()
Disconnects this instance. 
 | 
abstract InetAddress | 
getLocalIP()
Gets the local IP. 
 | 
protected void | 
onConnected(EventArgs e)  | 
protected void | 
onDisconnected(EventArgs e)  | 
protected void | 
onNetMsgReceived(NetMsgEventArgs e)
Raises the  
netMsgReceived event. | 
abstract void | 
send(IClientMsg clientMsg)
Sends the specified client net message. 
 | 
public NetFilterEncryption netFilter
public Event<NetMsgEventArgs> netMsgReceived
public GenericEvent connected
public GenericEvent disconnected
protected void onNetMsgReceived(NetMsgEventArgs e)
netMsgReceived event.e - The NetMsgEventArgs instance containing the event data.protected void onConnected(EventArgs e)
protected void onDisconnected(EventArgs e)
public abstract void connect(IPEndPoint endPoint)
endPoint - The end point.public abstract void disconnect()
public abstract void send(IClientMsg clientMsg) throws IOException
clientMsg - The client net message.IOExceptionpublic abstract InetAddress getLocalIP()
Copyright © 2012. All Rights Reserved.