Mailing Lists: Apple Mailing Lists
Image of Mac OS face in stamp
Re: Maximum number of sockets
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Maximum number of sockets



At 19:02 +0200 18/6/04, Eric Arlotti wrote:
It works well for 500 or 600 sockets, but problems occur around 1000 (1024 ?) sockets

Hmmm, that's very suspicious. If the library is, in fact, calling select, then it may be running into problem if you use more than 1024 sockets. The FD_SETSIZE, which is the maximum number of file descriptors that can be handled by the fd_set structure, is 1024. The select system call handles more file descriptors properly (well, as properly as select can given its less-than-ideal design), but it could be that your library is not handling it (for example, expecting to be able to represent an arbitrary socket within an fd_set structure rather than dynamically allocating the set).

S+E
--
Quinn "The Eskimo!" <http://www.apple.com/developer/>
Apple Developer Technical Support * Networking, Communications, Hardware
_______________________________________________
macnetworkprog mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/macnetworkprog
Do not post admin requests to the list. They will be ignored.




Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2011 Apple Inc. All rights reserved.