If there's already a listening socket on a port, then the state of the socket is changed to listen.
如果端口上已存在侦听的套接字,则将套接字的状态更改为LISTEN。
If the socket is not a listening socket, then control falls to soclose to check if there is already a control block attached to the socket.
如果套接字不是侦听套接字,则控制开始使用soclose,以检查是否已存在附加到套接字的控制块。
The soo_close() simply calls the so_close() function, which first checks if the socket to be closed is a listening socket (socket that's accepting incoming connections).
soo_close()仅调用 so_close()函数,该函数首先检查要关闭的套接字是否为侦听套接字(正在接收传入连接的套接字)。
Developing a scalable Winsock server is not terribly difficult. It's a matter of setting up a listening socket, accepting connections, and making overlapped send and receive calls.
开发大响应规模的Winsock服务器并不是很可怕,其实也就是设置一个监听套接字、接受连接请求和进行重叠收发调用。
This option widens or Narrows the scope of a listening socket, enabling unrestricted access from public and private users when appropriate, or restricting access only to the same site, as required.
此选项可扩大或缩小侦听套接字的范围,从而使得公共用户和私人用户可以在适当情况下对站点进行无限制的访问,或者可以根据需要对同一站点进行有限制的访问。
If you're not interested in IPv4, you can change the filter to 6:25 to refer to an IPv6 socket listening on port 25, or simply 6 to mean all IPv6 connections.
如果您对IPv 4不感兴趣,那么可以将筛选器改为6:25,以表示监听端口25的IPv6套接字,或者直接使用6表示所有的IPv 6连接。
Sometimes, it also refers to the current state of the sockets, for example, calling accept (Wsapiref_13aq.asp) on a socket that is not listening.
有时,它还引用此套接字的当前状态,调用套接字未侦听上接受(Wsapiref_13aq . asp)的是例如。
Main : the main function creates the socket to be used for listening to connections, and then creates the callback for accept to handle each connection through the event handler.
main:主函数创建用来监听连接的套接字,然后创建accept的回调函数以便通过事件处理函数处理每个连接。
Our need for notifiers arose when we created a service that starts a socket listening. While waiting for incoming connections, the calling thread sleeps as it awaits notification.
我们对事件通知机制的需求来源于当我们创建一个用来监听连接套接字的服务时。被调用线程在等待连接到来的时候一直处于睡眠状态,直到接收到了一个事件通知。
Our need for notifiers arose when we created a service that starts a socket listening. While waiting for incoming connections, the calling thread sleeps as it awaits notification.
我们对事件通知机制的需求来源于当我们创建一个用来监听连接套接字的服务时。被调用线程在等待连接到来的时候一直处于睡眠状态,直到接收到了一个事件通知。
应用推荐