For a real-time multiplayer game, the server is sending binary messages to the client with Websocket.
The first byte (uint8) of a message would be the "packet ID".
Example: packet 1 to "update entity": x, y, score, name in the next bytes.
But, to optimize the bandwidth, I would like to send only values that change between 2 frames.
Example (all values changed): packet 2 to "update entity position": x, y
packet 3 to "update entity score": score
packet 4 to "update entity name": name
My question is: is sending a lot of messages (packet 2, 3, 4) the same than sending 1 message (1 packet) not divided, in term of size (without considering the additional "packet ID" byte, negligible) ? Isn't there an additional cost to each Websocket message ?