hi, everyone! In my game, when the client enters the game, the server sends a large number of data packets to the client, but these data packets are not fully received by the client, and the client interrupts the connection If the server does not send these packets when the client enters the game, the client will not interrupt the connection But the server must send these packets to the client So please help me, what should I do?
Packets sent by NetworkedMultiplayerNet are not fully received
Sounds like it may be a bug? I don't know enough about networking though to say for sure. Are you sending the packets using RPC so the packets get resent if they are not received, or are you using UDP, which sends the packets out of sync and only once? I would recommend sending the data through RPC if you are not already, though keep in mind it will be slower. (Though as I said, I know VERY little about networking so please take what I have written with a large grain of salt!)
- Edited
Twisted, if the term packet is used generally that's a cue for me to think he's using UDP. This and UPD is the protocol of choice for gaming.
I think the answer is to generally advise: A ) Consider treating some data as essential and that using RPC is needed in this case. Information that defines the session to clients is an example, so would score results at the end of a session if applicable. B ) add code server size to dole out packets at a measured rate. In general servers (beefy hosting servers) are going to have much higher data rates than a client machine. This can be done by using an output queue design. Also add code to the client to squeak at the server if data seems to be being dropped. You can do this by adding sequence number to packets sent by the server and tracking them on the client side.