onConnect method

  1. @mustCallSuper
void onConnect(
  1. 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");
}