Hi folks!
I've come up with this problem when programming my insim application, the famous TCP - WOULDBLOCK.
After doing some research I've been reading some interesting old threads that discuss the topic. I'm no expert, so first of all I'd like to know what is exactly happening and what would be the best ways to tackle this problem. I'll explain first what is happening in detail.
My insim app is server oriented. It's a league managing insim. Players can request tables to see the TOP PBs and pre-qualifying times. Each table is at most 65 buttons, with not a lot of text.
Players can click on other players names in the tables to see a detail of their times, and each time they do that the table is cleared and completely re-sent.
So I'm testing with my teammates clicking on names like hell to force the insim to send a lot of buttons to them.
The server is located on my home computer, but it hangs on pretty well until at some point the server sends a TCP - WOULDBLOCK messsage and that player loses connection to the server.
As I understand it, what's happening is the following:
Is it possible that the server might end up diying also because the insim is sending too many buttons to it? Which is the *best* way to prevent clients from getting their TCP buffer full?
What I want the most is help and ideas about how to avoid having people losing connection to the server. Any help would be appreciated on techniques to avoid this.
I've come up with this problem when programming my insim application, the famous TCP - WOULDBLOCK.
After doing some research I've been reading some interesting old threads that discuss the topic. I'm no expert, so first of all I'd like to know what is exactly happening and what would be the best ways to tackle this problem. I'll explain first what is happening in detail.
My insim app is server oriented. It's a league managing insim. Players can request tables to see the TOP PBs and pre-qualifying times. Each table is at most 65 buttons, with not a lot of text.
Players can click on other players names in the tables to see a detail of their times, and each time they do that the table is cleared and completely re-sent.
So I'm testing with my teammates clicking on names like hell to force the insim to send a lot of buttons to them.
The server is located on my home computer, but it hangs on pretty well until at some point the server sends a TCP - WOULDBLOCK messsage and that player loses connection to the server.
As I understand it, what's happening is the following:
- A player requests a table. The insim sends all the buttons to the server, and then the server sends the same buttons to the client.
- If too much info is being sent to the client then the TCP buffer for that specific client's connection gets full and that sometimes causes the client to timeout or lose some important TCP packets that he should be receiving. This causes the client to lose connection.
Is it possible that the server might end up diying also because the insim is sending too many buttons to it? Which is the *best* way to prevent clients from getting their TCP buffer full?
What I want the most is help and ideas about how to avoid having people losing connection to the server. Any help would be appreciated on techniques to avoid this.