Closed kienhg96 closed 10 months ago
I like this idea, would you be willing to make a PR that implements this, including an extension to the standard from 1.02 -> 1.03?
OK, I'll try my best
I've thought about this more, the bandwidth cost and complexity of the change to add the client index to packets, is too high a price to pay, for something which could be implemented via a hash table look up on client id instead.
This also has the benefit that implementing it this way will also not require any changes in the protocol version.
So if you would like to add this feature, please implement a hash table lookup from client id -> client index, instead of including the client index in packets.
Thanks!
Agree, and I relized that, the client index
could not be placed inside the encrypted portion of packet.
We need the private key to decrypt the packet. But we cannot get the private key until we get the client index.
Yes this is another good point.
Hi,
I think that it would be better if the
client index
is embedded in bothconnection payload packet
andconnection disconnect packet
.Currently, after receiving a packet, server will iterate overall the array of clients to find the associated
client index
by functionnetcode_server_find_client_index_by_address
.I suggest this way:
client index
inconnection payload packet
andconnection disconnect packet
before sending.client index
from packet after receiving.client address array
equals with received packet addressIt could be like this:
connection payload packet:
connection disconnect packet:
Thanks for considering