This one is a bit of a beginner's question, but please bear with me.
I have a client sending buffers of data via a socket
to a receiving server. Both sides of connection are asynch.
The client needs to know for sure when the server has indeed
reveived the data.
To obtain this information the client cannot use the send()
return value since, at least with default settings on, send()
returning N on one side is not usually preceeded by recv() returning N
on the other side ,due to tcp internal buffering.
What would be the most _efficient_ way to obtain the above information ?
The two solutions I could think of:
- server returning confirmation message with a id of received buffer
- client & server both set to no-buffer mode.
seem both less than perfect.
(Operating systems: NT & Solaris)
Thanks in advance,