Click here to Skip to main content
15,888,351 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Friends, We had a client / server system. Around 1 GB of data flows in a specific use case from Client to Server. This is pushed via socket. While we have > 10 Mbps network speed looks like all goes well.

But ONLY during low network bandwidth we see Socket exception

Failed in remoting call to server ---> System.IO.IOException: Unable to write data to the transport connection: An existing connection was forcibly closed by the remote host. ---> System.Net.Sockets.SocketException: An existing connection was forcibly closed by the remote host



What I have tried:

This seems to be random earlier. But identified this is only due to network speed.
Posted
Updated 1-Nov-21 0:53am

1 solution

It's probably a timeout problem: start by looking at your code - we can't do that for you, we don't have it - and look for timeouts you can extend.
Socket Class (System.Net.Sockets) | Microsoft Docs[^]
It's probably either the ReceiveTimeout or the SendTimeout, but you'll probably need to measure the time it's taking and establish a worse case before you start playing or ot'll come back later at an importune moment.
 
Share this answer
 
v2

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900