All the documentation says is that listen
might block, not that it definitely will. It might also be blocking only very briefly, e.g., to wait for the NIC device driver to complete existing activity.
Windows Sockets allows for the installation of third-party providers to support additional protocols or existing protocols with extra features. Since the Winsock SPI does not prohibit third-party providers from blocking on listen
, applications should follow the advice provided by MSDN with regards to APCs and nested Winsock calls.
It seems likely that the built-in TCP/IP provider never blocks on listen
but AFAIK there is no explicit guarantee of this.