NetworkId is just a wrapper around u64, so there isn't much of a functionality change here, just a refactor. Two dependency changes are present:
renetcode now has a serde feature, which adds Serialization and Deserialization impls for NetworkId when enabled.
bev_renet now directly depends on renetcode. This is only to enable the serde feature
I noticed that in the code, ClientId was used, while the issue mentioned NetworkId/NetId. I thought NetworkId was a better name, in case clients would need it to refer to the server, but I'm totally open to changing the name.
I also didn't write any docs for NetworkId, I wasn't sure what to put other than "Wraps u64"
fixes: #41
The main change is in
renetcode/src/server.rs
.NetworkId
is just a wrapper aroundu64
, so there isn't much of a functionality change here, just a refactor. Two dependency changes are present:renetcode
now has aserde
feature, which addsSerialization
andDeserialization
impls forNetworkId
when enabled.bev_renet
now directly depends onrenetcode
. This is only to enable theserde
featureI noticed that in the code,
ClientId
was used, while the issue mentionedNetworkId
/NetId
. I thoughtNetworkId
was a better name, in case clients would need it to refer to the server, but I'm totally open to changing the name.I also didn't write any docs for
NetworkId
, I wasn't sure what to put other than "Wrapsu64
"