-
Notifications
You must be signed in to change notification settings - Fork 0
Description
in the current version of delivery the DeliveryPacketVault functions like this:
It stores all
DeliveryPacket's which were registered by the developer in anArrayListand takes the index of this list as theidof theDeliveryPacket. So currently, there is no way to interfere with theidand mess something up but this means also that theidcan not be manually set.
It might be a better plan to actually have a HashMap instead of the list a which holds the id's and the DeliveryPacket. If it would be changed to a HashMapthere has to be some algorithm which automatically gives the DeliveryPacket an id. Problem is that the id of the DeliveryPacket has to be the same on the server and client. Otherwise, there will be a with recognizing the DeliveryPacket.
Maybe it is an idea to send a 'simplePacketName' at the beginning of the DeliveryPacket which will be broken down from the real class name? Then there won't be the problem with the id 😏