winsock issue

G

Guest

Hi,

Take in mind the following scenario: two computers are sending data to each other ( using winsock ), one computer send data faster then the rate data is being processed by the other computer, this will cause the target computer TCP Stack to get filled and the source computer will not be able to send data until the target computer will handle this data, Taking that in mind, what happen in the period of time the source computer try to send data to the full TCP Stack of the target computer? does the data is being re-sent over the net in each try? how does this functionality is implemented by winsock? what happen in this period of time? what data is sent over the net at each re-try???

Nadav
http://www.ddevel.com
 
W

William DePalo [MVP VC++]

Nadav said:
Take in mind the following scenario: two computers are sending
data to each other ( using winsock ), one computer send data
faster then the rate data is being processed by the other computer,
this will cause the target computer TCP Stack to get filled and the
source computer will not be able to send data until the target
computer will handle this data, Taking that in mind, what happen
in the period of time the source computer try to send data to the
full TCP Stack of the target computer? does the data is being
re-sent over the net in each try?

I think that when you choose to use sockets (a relatively high-level
abstraction over the intrinsic transport mechanism) that these are not the
questions to ask. They are implementation details handled by the provider.
That is to say, when you call send() if the call succeeds that the "network"
has taken responsibility for the transmission. If you can keep your
application alive, if the receiver can keep his side alive, then the network
will see to it that the data get delivered ultimately.

Above that, if you need to know the what or when or how about the counter
party's handling of the data or what his data rate is then you'll need to
build that into your own application protocol.

Of course if your question really has to do with "blocking" then you might
want to take a look at WSASend() for asynchronous processing, or
setsockopt() to manage buffering or ioctlsocket() to control the I/O
characteristics of sockets.

IMO, sockets are one of those things that on first glance appear simple but
on long reflection turn out to be _quite_ complicated. You may want to check
a good networking text.

Regards,
Will
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top