onMessage abstract method

void onMessage(
  1. ClientSession session,
  2. Message message
)

Called when a message is received from a client, after it has been decoded.

This method is called for all messages, not just custom messages handled by this plugin.

The plugin can then react to the message, for example by sending a response to the client.

If the session terminates, this method will not be called again.

Implementation

void onMessage(ClientSession session, Message message);