Byte vs. Int over network

BlitzMax Forums/BlitzMax Programming/Byte vs. Int over network

rdodson41(Posted 2007) [#1]
In a network game context, is it better to send and receive Bytes through a socket rather than Ints since Bytes are small even though Ints are word size?


Derron(Posted 2007) [#2]
It depends on the overall size of your packets...

Because your OS uses specific window sizes (receive and send window) it has a little slowdown when reaching the limit.

As long as you only send the position of a player and the id of him there wouldn't be a case to matter about.


bye
MB


rdodson41(Posted 2007) [#3]
okay thanks


FlameDuck(Posted 2007) [#4]
Remember that the minimum size of an Ethernet frame is 64 bytes (512 bits). If you send less, it will be padded by your NIC.