public PortalPacketHandler(byte packetID, ushort length, PortalContext context, PortalReceive onReceive) { ID = packetID; Length = length; Context = context; OnReceive = onReceive; }
public PortalPacketHandler Register(ushort id, PortalContext context, PortalReceive onReceive) { if (Handlers.ContainsKey(id)) { ToConsole("Warning: Replacing Packet Handler for {0}", id); } return(Handlers[id] = new PortalPacketHandler(id, context, onReceive)); }
public PortalPacketHandler Register(ushort id, PortalContext context, PortalReceive onReceive) { lock (((ICollection)Handlers).SyncRoot) { if (Handlers.ContainsKey(id)) { ToConsole("Warning: Replacing Packet Handler for {0}", id); } return Handlers[id] = new PortalPacketHandler(id, context, onReceive); } }
public PortalPacketHandler(ushort packetID, PortalContext context, PortalReceive onReceive) { ID = packetID; Context = context; OnReceive = onReceive; }
public PortalPacketHandler Register(byte id, ushort length, PortalContext context, PortalReceive onReceive) { lock (((ICollection)Handlers).SyncRoot) { return(Handlers[id] = new PortalPacketHandler(id, length, context, onReceive)); } }
public PortalPacketHandler Register(byte id, ushort length, PortalContext context, PortalReceive onReceive) { lock (((ICollection)Handlers).SyncRoot) { return Handlers[id] = new PortalPacketHandler(id, length, context, onReceive); } }