Listen () maximum queue size for each version of Windows

The Winsock listen function (socket, backlog) has a parameter indicating the size of the queue for pending connections. The program must pass SOMAXCONN to set the maximum queue size.

Question: What is the maximum queue size for each version of Windows: 2000, XP, Vista, 7?

Thank!

Link: listen () in the MSDN library

+3
source share
5 answers

What do you hope to achieve when you find out the answer to this question?

There are many ways to increase the efficiency of receiving connections, you should focus on this, and not on the actual number of connections connected in the queue.

, , , . , , , AcceptEx() IOCP , .

, .

-1

5 NTWS 4.0: http://support.microsoft.com/kb/127144

XP, , XP - Microsoft. ( , , , ).

Java- , Windows 7 Pro 50, 200. FWIW.

, - , . , .

, , . 5, , . 200 . - , .

+8

, 200 Windows 7, , ..

, , , ( , ).

Len AcceptEx IOCP, , , . 1600 , .

0

, Listen() Visual Studio 9.0 ( 2008) 5. c:\Program Files\Microsoft Visual Studio 9.0\VC\atlmfc\include\afxsock.h: BOOL Listen(int nConnectionBacklog=5);

: https://docs.microsoft.com/en-us/cpp/mfc/reference/casyncsocket-class?view=vs-2019#listen

0

backlog listen (socket, backlog) SOMAXCONN. SOMAXCONN, , , 1.

Windows 2:

  • Windows Sockets 1 SOMAXCONN = 5. Winsock 1.1 Windows 95 Windows NT 3.5.
  • Windows Sockets 2 SOMAXCONN = 0x7fffffff SOMAXCONN = 0x7fffffff ( ). Winsock 2.1 Windows 95 Windows 98, Windows NT 4.0 Windows.
  • Windows 8 "RIO" (Registered IO) Winsock. 3. SOMAXCONN_HINT(N) SOMAXCONN SOMAXCONN. N, (200, 65535) 1.

:

" listen() Bluetooth backlog ( 2 4), . , . , ". 1

:

  1. , Winsock2.h, Windows
  2. Winsocks Listen() Windows 8+
  3. Winsock,
0

Source: https://habr.com/ru/post/1785831/


All Articles