In Which Bagels Arises From TCP H*ll
- when a session is established(status code 17) and there is no data, Sn_Rxsz=0, the program retries reading the data size for a couple of seconds before giving up and closing the session; and
- If a status of SOCK_FIN_WAIT is seen the program waits several hundred ms to see if it clears before closing the socket
Both of these changes seem to be needed when a session is established from the public internet rather than on the local LAN. I do see both situations using Chrome on the LAN but retries don’t help in either case: Sn_Rsz never fills in and SOCK_FIN_WAIT never goes away.
After making these changes, I opened up the game server to a couple of friends from the Cosmac Elf list to try remotely. In both cases they reported that the server never stalled or locked up the browser. I also tried it from safari, chrome, and IE from the library wifi and from safari on my phone. All of those were fine and i could see the changes taking effect in the log. I would swear that i never saw anything similar with the W5200 but i won’t be in a position to prove that for a few weeks.
At any rate, after a dozen or so games and a couple of undred pages served, the server seems quite usable now and I’m planning to open it up a bit wider on the weekend after making some minor functional changes.