Jump to content
  • Advertisement
Sign in to follow this  
Cybrosys

[.net] TcpClient rules

This topic is 4273 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Does anyone know if a TcpClient's NetworkStream closes the connection if a packet fails to be delivered, that is, even if resend fails that's built-in to the tcp protocol.

Share this post


Link to post
Share on other sites
Advertisement
I once asked this sort of question to the networking gurus at a game shop.
Basically, they said that if this happens then there are bigger problems to worry about.

In essence the answer became, catch an exception (probably a system.io.ioexception) to this effect and try to establish the connection again, or wait for the connection to re-establish from the client.

There are like 60 possible lame situations that can happen to cause problems across the network, and it is hard to make it a reliable connection.

But, if you really want to know...here is a test you might try

write an app that sends data across the wire
repeat
send a small amount of data
sleep for a little bit
until done
then pull the network cable and plug it back in.

As a side note, tcp is supposed to garuntee a packet is received, like you said, resending packets and such.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!