Sir Angelo 1989
Sir Angelo 1989

Reputation: 13

C# tcp protocol connection in Windows. What happens if server application crash?

What happens if I make a server application using tcp protocol and then establish connection with a client application but the server crash and then the client send data. Will the data be lost or the system will continue trying to send it?

Upvotes: 0

Views: 139

Answers (1)

Thijs Dalhuijsen
Thijs Dalhuijsen

Reputation: 778

Unfortunately the data will be lost. you need to catch the exception and retry manually.

Mind that you put a Thread.Sleep in there or something so you don't hammer the server to death in a loop. :)

Upvotes: 1

Related Questions