public class MotionServer extends AbstractSocketServerXSocket
activateConnectionLogging, srv, transferRate
DEFAULT_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, start
setPort
public MotionServer(ISocketServerProtocolDecoderFactory protocolFactory, int listenPort)
public void packetArrived(ISocketServerConnection connection, Object pckt)
ISocketServerConnectionListener
connection
- 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)
ISocketServerConnectionListener
connection
- the source of the event.public void socketConnected(ISocketServerConnection connection)
ISocketServerConnectionListener
connection
- the source of the event.public void socketException(ISocketServerConnection connection, Exception ex)
ISocketServerConnectionListener
connection
- the source of the event.ex
- the exception representing the error.Copyright © 2018 universAAL Consortium. All rights reserved.