public interface ISocketServerConnection extends Closeable
Modifier and Type | Method and Description |
---|---|
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.
|
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 backdata
- byte buffer containing the data to be sentInetAddress getRemoteAddress()
int getRemotePort()
Copyright © 2018 universAAL Consortium. All rights reserved.