sockets - Is there an 'optimal' buffer size when using send()? -
let's you're transferring file of arbitrary length in chunks on tcp/ip:
looping... read(buffer, length) send(mysocket, buffer, length, flags)
my question is, optimal value of length? or not matter @ all? i've seen 256 bytes 8192 bytes being used.
depends mean optimal. optimal usage of bandwidth, want maximize packet size send @ least network packet size (which on ethernet 1500 bytes). if reading disk 4096 or 8192 bytes value.
Comments
Post a Comment