My client app uses socket as http connections, meaing one-time send,receive, and close, i considered using a single persistent connection, instead of separate connection, each time, but problem was, sometimes the server received 2 packets of 32 kiB, while a single packet of 64kiB, the other times, and somtimes even smaller size, so to compensate for the latency introduced by 3 way handshake, i wanted to enable TCP_FASTOPEN
, and TCP_NODELAY
,
I use setsockopt
with both options to the client-side(connect
ing) socket, but im confused that:
- At the server side, which socket to
setsockopt
, the one created withsocket
function, or theaccept
ed one, or both, for both options, - Also, is there any solution, to the problem, of un-intentional partitioning of data packets, like 2x32k, or 4x16k, instead of 1x64k
thanking you
I read the documentation available in linux man pages, but found it confusing