markiodev / Networker

A simple to use TCP and UDP networking library for .NET. Compatible with Unity.
MIT License
478 stars 77 forks source link

Fixed Packet Processing #26

Closed thatgoofydev closed 5 years ago

thatgoofydev commented 5 years ago

The ClientPacketProcessor didn't find the right IPacketHandler due to an error in the code. This is now fixed and the packet processing code has been cleaned up (client and server code).

When using ZeroFormatterPacketSerialiser the packet instance of PacketHandlerBase.Process(T packet, ISender sender) is null, this was because the deserialize method was not yet implemented, this is now implemented.

Changes

ClientPacketProcessor:

ServerPacketProcessor:

ZeroFormatterPacketSerialiser:

I have tested both ZeroFormatter and ProtobufNet applications and everything seems to be working properly.