onConnect method
- SocketInfo source
inherited
Sets destination
to the incoming source
.
Override this function to run custom code when a device connects to this socket.
Implementation
@mustCallSuper
void onConnect(SocketInfo source) {
destination = source;
logger.info("Port $port is connected to $source");
}