C# Class Simian.PacketEventDictionary

Registers, unregisters, and fires events generated by incoming packets
Datei anzeigen Open project: 3di/3di-viewer-rei-libs

Public Methods

Method Description
PacketEventDictionary ( ) : System

Default constructor

RegisterEvent ( PacketType packetType, PacketCallback eventHandler ) : void

Register an event handler

Use PacketType.Default to fire this event on every incoming packet

UnregisterEvent ( PacketType packetType, PacketCallback eventHandler ) : void

Unregister an event handler

Private Methods

Method Description
BeginRaiseEvent ( PacketType packetType, Packet packet, Agent agent ) : void

Fire the events registered for this packet type asynchronously

ThreadPoolDelegate ( Object state ) : void

Method Details

PacketEventDictionary() public method

Default constructor
public PacketEventDictionary ( ) : System
return System

RegisterEvent() public method

Register an event handler
Use PacketType.Default to fire this event on every incoming packet
public RegisterEvent ( PacketType packetType, PacketCallback eventHandler ) : void
packetType PacketType Packet type to register the handler for
eventHandler PacketCallback Callback to be fired
return void

UnregisterEvent() public method

Unregister an event handler
public UnregisterEvent ( PacketType packetType, PacketCallback eventHandler ) : void
packetType PacketType Packet type to unregister the handler for
eventHandler PacketCallback Callback to be unregistered
return void