Topic: Game Programming /
What you may be running into is an optimization happening from Nagle’s Algorithm. This is generally implemented at the kernel level (or lower) of your OS.
The algorithm improves network performance from applications that send very small packet sizes such as yours (~2 bytes). The algorithm buffers packets until an ACK pakcet is received on the other end, then all buffered packets are sent together.
Here are some documents related to it:
Congestion Control in IP/TCP Internetworks (RFC896)
Nagle’s algorithm (Wikipedia)