Buffer size for SendNetworkData and ReceiveNetworkData
Posted: Thu Jun 15, 2023 8:54 pm
What is the theory behind choosing a buffer size to use for sending and receiving data (tcp connections.)
Is there some wisdom in choosing larger or smaller sizes? Right now both my client and server appear to work fine with either 2k or 16k buffers. I'm guessing if I call ReceiveNetworkData with 2k buffers I'll just have to call it more times. When it comes to SendNetworkData with 2k or 16k, obviously same thing true in code, but does it also affect how the data is actually transmitted? And if so what are best practices?
Thanks
Is there some wisdom in choosing larger or smaller sizes? Right now both my client and server appear to work fine with either 2k or 16k buffers. I'm guessing if I call ReceiveNetworkData with 2k buffers I'll just have to call it more times. When it comes to SendNetworkData with 2k or 16k, obviously same thing true in code, but does it also affect how the data is actually transmitted? And if so what are best practices?
Thanks