Quantcast
Channel: Visual C forum
Viewing all articles
Browse latest Browse all 15302

WSASend remote stack full

$
0
0

Hi,

I would like to know if the function WSASend will return me an error when the remote TCP buffer is full and can no loger cumulate data till the remote server read data from it.

Ex :

  1. The remote server force a small buffer (for test purpose and the present exemple) usingSO_RCVBUF and specifiying 10 bytes.
  2. The local client send 8 bytes to the remote server using WSASend in non-blocking mode.
  3. The remote server don't have time to read it, so the sockets layer stack the data.
  4. The local client send 20 bytes to the remote server using WSASend in non-blocking mode

Now, is WSASend will return me an error if the remote server cannot cumulate new data arrival ?

The reasonI want to knowthis behavior is thatI constantly have tosend data to a remote server.As long as I sent a packet, I want to be surethat remote server havebeen received it,this data may not beprocessed by the serverbut it is theTCPstack ready to be read.And I don't want touse a syncronisation mechanism,it would increasetheprotocol.

Thus, if the packet I send is having 8 bytes each and my server can stack 32 bytes total in its socket layer then I will send 4 packet without problem. Now pretent I send another packet and the server did not
called WSARecv, then I would have WSASend return me an error. Is it possible ?

Best regards,
Martin


Viewing all articles
Browse latest Browse all 15302

Latest Images

Trending Articles



Latest Images

<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>