RegisterMessageHandler
Registers a new handler on a specific channel. The new handler is called whenever a message is sent to the ChannelClient.
Read time 1 minuteLast updated 9 days ago
Definition
- Type: Method
- Namespace: UnityEditor.MPE
- Assembly: UnityEditor.CoreModule
RegisterMessageHandler(Action<string>)
Registers a new handler on a specific channel. The new handler is called whenever a message is sent to the ChannelClient.
public Action RegisterMessageHandler(Action<string> handler)
Parameters
A handler for all incoming messages on a specific channel.
Returns
Type | Description |
|---|---|
| Action | An action that, when invoked, unregisters the ChannelClient handler (See ChannelClient.UnregisterMessageHandler). |
RegisterMessageHandler(Action<byte[]>)
Registers a new handler on a specific channel. The new handler is called whenever a message is sent to the ChannelClient.
public Action RegisterMessageHandler(Action<byte[]> handler)
Parameters
A handler for all incoming messages on a specific channel.
Returns
Type | Description |
|---|---|
| Action | An action that, when invoked, unregisters the ChannelClient handler (See ChannelClient.UnregisterMessageHandler). |