org.alliance.core.comm
Class PacketConnection
java.lang.Object
org.alliance.core.comm.Connection
org.alliance.core.comm.PacketConnection
- Direct Known Subclasses:
- AuthenticatedConnection, HandshakeConnection
public abstract class PacketConnection
- extends Connection
Created by IntelliJ IDEA.
User: maciek
Date: 2006-jan-25
Time: 16:10:48
| Fields inherited from class org.alliance.core.comm.Connection |
bandwidthIn, bandwidthOut, bytesReceived, bytesSent, connected, core, direction, hasWriteInterest, key, netMan, statusString |
| Methods inherited from class org.alliance.core.comm.Connection |
bytesReceived, bytesSent, close, getBandwidthIn, getBandwidthOut, getBytesReceived, getBytesSent, getConnectionId, getConnectionIdForRemote, getDirection, getKey, getNetMan, getStatusString, hasWriteInterest, isConnected, setHasWriteInterest, setKey, setStatusString, toString |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
PacketConnection
protected PacketConnection(NetworkManager netMan,
Connection.Direction direction)
PacketConnection
protected PacketConnection(NetworkManager netMan,
Connection.Direction direction,
java.lang.Object key)
init
public void init()
throws java.io.IOException
- Overrides:
init in class Connection
- Throws:
java.io.IOException
packetReceived
public abstract void packetReceived(Packet p)
throws java.io.IOException
- Throws:
java.io.IOException
send
public void send(Packet p)
throws java.io.IOException
- Throws:
java.io.IOException
readyToSend
public void readyToSend()
throws java.io.IOException
- Specified by:
readyToSend in class Connection
- Throws:
java.io.IOException
received
public void received(java.nio.ByteBuffer buf)
throws java.io.IOException
- Specified by:
received in class Connection
- Throws:
java.io.IOException
getLastPacketSentAt
public long getLastPacketSentAt()
getPacketsReceived
public int getPacketsReceived()