Calling connect() too many times!!!!
Hi
After calling the connect function several times (3000+) the following error message appeared:
-------------------------------------------
“Windows socket error: An operation on a socket could not be performed because the system lacked sufficient buffer space or because a queue was full (10055), on API connect”
-------------------------------------------
What does that mean?
Note that I close the previous connection before the next call to the connect function.
There is typically no guarantee that closing a filedescriptor or socket completely flushes the buffers or completely frees up the resources taken by the socket immediately.
I haven''t done much windows networking programming, but I believe DisconnectEx might be more useful to you in your situation than closesocket.
On the other hand, I really don''t see why you''ll need to connect with 3000+ sockets in the first place.
-Neophyte
I haven''t done much windows networking programming, but I believe DisconnectEx might be more useful to you in your situation than closesocket.
On the other hand, I really don''t see why you''ll need to connect with 3000+ sockets in the first place.
-Neophyte
He didn''t say he needed 3000 connections, he said he calls connect() 3000 times. DisconnectEx is only available under Windows XP but yes, it is a more powerful/flexible API call than closesocket().
Now, I''m not sure why connect() would be failing. The only thing to ensure would be:
1. Make sure you call shutdown(socket_, SD_BOTH) first, and then call closesocket().
2. Set the SO_DONTLINGER option to true. This is especially important for asynchronous / non-blocking sockets.
For some reason you might be running out of non-paged memory. Try those guidelines above and then let us know.
Also, if you can post what O/S and Service Packs you are using it would be helpful.
Now, I''m not sure why connect() would be failing. The only thing to ensure would be:
1. Make sure you call shutdown(socket_, SD_BOTH) first, and then call closesocket().
2. Set the SO_DONTLINGER option to true. This is especially important for asynchronous / non-blocking sockets.
For some reason you might be running out of non-paged memory. Try those guidelines above and then let us know.
Also, if you can post what O/S and Service Packs you are using it would be helpful.
[email=direwolf@digitalfiends.com]Dire Wolf[/email]
www.digitalfiends.com
www.digitalfiends.com
I’m trying to check for available servers on my local network. My OS is Windows 2000 with SP3.
I create a list of available servers by having the servers send out UDB broadcasts. About once per second, each client checks to see if it has received any broadcasts on that particular port, it gets the broadcast, which contains information about the server. Of course, this only works for LANs or even just subnets, though I''m not sure of the exact scope.
~BenDilts( void );
~BenDilts( void );
I get the impression that he is looking to make a network browser, not just a game server browser.
[email=direwolf@digitalfiends.com]Dire Wolf[/email]
www.digitalfiends.com
www.digitalfiends.com
im using non-blocking sockets.
BeanDog, i like you'r idea.
[edited by - fma on February 27, 2003 11:34:45 PM]
BeanDog, i like you'r idea.
[edited by - fma on February 27, 2003 11:34:45 PM]
So all you are trying to do is create support for a game server browser?
[email=direwolf@digitalfiends.com]Dire Wolf[/email]
www.digitalfiends.com
www.digitalfiends.com
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement
Recommended Tutorials
Advertisement