public PacketProcessor(PacketSerializer serializer) { Serializer = serializer ?? throw new ArgumentNullException(nameof(serializer)); foreach (var code in serializer.Messages.Game.OpCodeToName.Keys) { _rawHandlers.Add(code, new HashSet <RawPacketHandler>()); _handlers.Add(code, new HashSet <Delegate>()); } }
public PacketProcessor(PacketSerializer serializer, PacketLogWriter logWriter) { Serializer = serializer; LogWriter = logWriter; foreach (var code in serializer.GameMessages.OpCodeToName.Keys) { _rawHandlers.Add(code, new HashSet <RawPacketHandler>()); _handlers.Add(code, new HashSet <Delegate>()); } }
internal virtual void OnDeserialize(PacketSerializer serializer) { }