Stormancer.Networking.PacketProcessorConfig Class Reference

Contains method to register handlers for message types when passed to the IPacketProcessor.RegisterProcessor method. More...

Public Member Functions

void AddProcessor (byte msgId, Func< Packet, Task< bool >> handler)
 Adds an handler for the specified message type. More...
 
void AddCatchAllProcessor (Func< byte, Packet, bool > handler)
 Adds More...
 

Detailed Description

Contains method to register handlers for message types when passed to the IPacketProcessor.RegisterProcessor method.

Member Function Documentation

◆ AddCatchAllProcessor()

void Stormancer.Networking.PacketProcessorConfig.AddCatchAllProcessor ( Func< byte, Packet, bool >  handler)

Adds

Parameters
handler

◆ AddProcessor()

void Stormancer.Networking.PacketProcessorConfig.AddProcessor ( byte  msgId,
Func< Packet, Task< bool >>  handler 
)

Adds an handler for the specified message type.

Parameters
msgIdA byte representing the message type.
handlerA Func<Packet,bool> instance to be executed when receiving a packet with the message type.

The documentation for this class was generated from the following file:
  • Stormancer.Unity/IPacketProcessor.cs