你说的不是最大连接数,而是bsd socket的默认socket处理队列的大小,队列里面放着是已经连接未被处理的socket请求(也就是没有accept),如果想改变这个大小的话,int listen(
SOCKET s,
int backlog
);
Parameters
s
[in] Descriptor identifying a bound, unconnected socket.
backlog
[in] Maximum length of the queue of pending connections. If set to SOMAXCONN, the underlying service provider responsible for socket s will set the backlog to a maximum reasonable value. There is no standard provision to obtain the actual backlog value.