Article ID: 111855
Article Last Modified on 11/1/2006
struct WSAData {
WORD wVersion;
WORD wHighVersion;
char szDescription[WSADESCRIPTION_LEN+1];
char szSystemStatus[WSASYSSTATUS_LEN+1];
unsigned short iMaxSockets;
unsigned short iMaxUdpDg;
char FAR * lpVendorInfo
};
On return from WSAStart() on Windows NT
iMaxSockets = 0x7fff (32767)where iMaxSockets is the maximum number of sockets that a single process can potentially open. A Windows Sockets implementation can provide a global pool of sockets for allocation to any process, or it can allocate per-process resources for sockets. The number can reflect the way in which the Windows Sockets DLL or the networking software was configured. The number can also be used when writing an application as an indication of whether the Windows Sockets implementation can be used by the application.
/* * Select uses arrays of SOCKETs. These macros manipulate such * arrays. FD_SETSIZE may be defined by the user before including * this file, but the default here should be >= 64. * * CAVEAT IMPLEMENTOR and USER: THESE MACROS AND TYPES MUST BE * INCLUDED IN WINSOCK.H EXACTLY AS SHOWN HERE. */ #ifndef FD_SETSIZE #define FD_SETSIZE 64 #endif /* FD_SETSIZE */This value is used in constructing the fd_set structures used in select(). The default value in WINSOCK.H is 64. If an application is designed to be capable of working with more than 64 sockets, define the manifest FD_SETSIZE in every source file before including WINSOCK.H. One way of doing this is to include the definition within the compiler options in the makefile, such as adding -DFD_SETSIZE=128 as an option to the compiler command line for Microsoft C.
Additional query words: prodnt tcpip
Keywords: kbnetwork KB111855