Winsock select/async: Max 64 connections. How does mIRC and similar programs work?
As I understand it, using sockets and select()/async, one server can only accept 64 connections at once. How does IRC servers work? Do they use some other kind of socket networking?
Thanks,
-Trond
-Trond
January 09, 2004 04:32 PM
The max connections is a defined number, and can be changed, although it can be unsafe to do so...
Also, the max connections PER THREAD is 64 when using these methods, so you can set up multiple threads being careful to not have multiple threads playing around with the same socket at the same time.
There are also other ways of doing it (IOCP which will manage threads for you) where you do not have the 64 connection limit.
Also, the max connections PER THREAD is 64 when using these methods, so you can set up multiple threads being careful to not have multiple threads playing around with the same socket at the same time.
There are also other ways of doing it (IOCP which will manage threads for you) where you do not have the 64 connection limit.
You might want to see what the Winsock FAQ has to say about this. It addresses both maximum number of sockets in a Winsock app and the 64 socket limit.
Call select a bunch of times, each time with a different 64-socket set.
“Debugging is twice as hard as writing the code in the first place. Therefore, if you write the code as cleverly as possible, you are, by definition, not smart enough to debug it.” — Brian W. Kernighan (C programming language co-inventor)
“Debugging is twice as hard as writing the code in the first place. Therefore, if you write the code as cleverly as possible, you are, by definition, not smart enough to debug it.” — Brian W. Kernighan (C programming language co-inventor)
"Debugging is twice as hard as writing the code in the first place. Therefore, if you write the code as cleverly as possible, you are, by definition, not smart enough to debug it." — Brian W. Kernighan
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement
Recommended Tutorials
Advertisement