I'm a software engineer, but I think my problem needs a network engineer...
For the software side of things, have a look at my Stack Overflow question: https://stackoverflow.com/questions/21641219/sending-and-receiving-over-network-using-tcpclient-socket-or-stream-fails-afte
I have the simplest possible length-prefixed string send-and-receive client and server. The client reads a line of input, sends it to the server, then waits to receive a response. The server reads the request string, then echoes it right back out.
I find that I can do five send-and-receives, and then on the sixth try, the client says it's sent the line of text, and it tries to receive the server response. The server gives no indication that it's received anything. And it's like clockwork, five times every time. Some time early yesterday it was consistently three times. Now it's five. What perverse system behaves like that?
The client runs in my office, Win7-64. The server runs in AWS, Win2k8R2.
I've tried disabling the client and server firewalls. I've tried a different AWS EC2s.
Wireshark says that it's doing TCP Retransmits in the hanging case. Eventually the client throws a "connection dropped" exception. Later, the server does likewise.
Any ideas?