|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface ISocketServerConnection
Interface to be implemented by the classes handling socket connections.
Method Summary | |
---|---|
int |
getConnectionReceivedPackets()
Gets the number of packets received through this connection. |
int |
getConnectionSentPackets()
Gets the number of packets successfully sent. |
int |
getId()
Gets the identifier number of the connection. |
InetAddress |
getRemoteAddress()
Returns the remote IP address. |
int |
getRemotePort()
Returns the remote port. |
boolean |
isConnectionClosed()
Returns false if the connection connections is already closed, true if it is still opened. |
void |
setConnectionLister(ISocketServerConnectionListener listener)
Set the listener. |
void |
setId(int connectionId)
. |
void |
writeToConnection(ByteBuffer data)
Sends the data passed in a ByteBuffer through the connection. |
Methods inherited from interface java.io.Closeable |
---|
close |
Method Detail |
---|
void setConnectionLister(ISocketServerConnectionListener listener)
listener
- listener.int getConnectionReceivedPackets()
int getConnectionSentPackets()
int getId()
boolean isConnectionClosed()
void setId(int connectionId)
connectionId
- integer used to identify the connection.void writeToConnection(ByteBuffer data)
packetSent
is
called back
data
- byte buffer containing the data to be sentInetAddress getRemoteAddress()
int getRemotePort()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |