public interface ISocketServerConnectionListener
Modifier and Type | Method and Description |
---|---|
void |
packetArrived(ISocketServerConnection connection,
Object pckt)
Called when a packet is fully reassembled.
|
void |
packetSent(ISocketServerConnection connection,
int size)
Called after a packet has been sent.
|
void |
socketConnected(ISocketServerConnection connection)
Called when a new connection is established, and the handler has been
setup.
|
void |
socketDisconnected(ISocketServerConnection connection)
Called when the read operation reaches the end of stream.
|
void |
socketException(ISocketServerConnection connection,
Exception ex)
Called when some error occurs while reading or writing to the socket.
|
void packetArrived(ISocketServerConnection connection, Object pckt)
connection
- the source of the event.pckt
- the reassembled packet. The type of the object is determined
by the ISocketSeverProtocolDecoder
class used.void packetSent(ISocketServerConnection connection, int size)
writeToConnection
connection
- The connection which sent the packetsize
- The size of the packet sentvoid socketDisconnected(ISocketServerConnection connection)
connection
- the source of the event.void socketConnected(ISocketServerConnection connection)
connection
- the source of the event.void socketException(ISocketServerConnection connection, Exception ex)
connection
- the source of the event.ex
- the exception representing the error.Copyright © 2015 universAAL Consortium. All Rights Reserved.