@Override public void onConnection(ClientConnection connection) throws ChatException { // assign connection to self and start it connection.start(); // notify about connection if (connectionListener != null) { connectionListener.onConnection(connection); } }
public void sendCommand(ClientConnection connection, byte[] bytes) throws ChatIOException { connection.sendCommand(bytes); }