Esempio n. 1
0
        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>());
            }
        }
Esempio n. 2
0
        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>());
            }
        }
Esempio n. 3
0
 internal virtual void OnDeserialize(PacketSerializer serializer)
 {
 }