When I use SomeConnectKey to connect, I am unable to connect to the server created by C # LiteNetLib。When comparing the sent data, I found that when using net_dataw_writer to write the key, the length was reduced by 1.
void write(const std::string& str) { write((uint16_t) (str.size()+1)); write((uint8_t*) str.data(), 0, str.size()); }