
public class MotionServer extends AbstractSocketServerXSocket
activateConnectionLogging, srv, transferRateDEFAULT_TCP_BUFFERS_SIZE, listenPort, nWorkersCPUmultiplier, nWorkersIO, protocolDecoderFactory, tcpBufferSizeIn, tcpBufferSizeOut, workerPool| Constructor and Description |
|---|
MotionServer(ISocketServerProtocolDecoderFactory protocolFactory,
int listenPort) |
| Modifier and Type | Method and Description |
|---|---|
void |
packetArrived(ISocketServerConnection connection,
Object pckt)
Called when a packet is fully reassembled.
|
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.
|
close, getServerXSocket, getTotalReadBytes, getTotalSentBytes, getTransferRateIn, getTransferRateOut, onConnect, onConnectionTimeout, onData, onDisconnect, onIdleTimeout, packetSent, run, setActivateConnectionLogging, setIP, startsetPortpublic MotionServer(ISocketServerProtocolDecoderFactory protocolFactory, int listenPort)
public void packetArrived(ISocketServerConnection connection, Object pckt)
ISocketServerConnectionListenerconnection - the source of the event.pckt - the reassembled packet. The type of the object is determined
by the ISocketSeverProtocolDecoder class used.public void socketDisconnected(ISocketServerConnection connection)
ISocketServerConnectionListenerconnection - the source of the event.public void socketConnected(ISocketServerConnection connection)
ISocketServerConnectionListenerconnection - the source of the event.public void socketException(ISocketServerConnection connection, Exception ex)
ISocketServerConnectionListenerconnection - the source of the event.ex - the exception representing the error.Copyright © 2018 universAAL Consortium. All rights reserved.