简体   繁体   中英

Winsock Port Listener

I've done a TCP port listener. it works when i connect to it locally using client with 127.1.1.0 and a port that listener is bound to accept connection. can you make it to listen to any IP that connects through that port and would it be possible to listen to a second client port that is accepting from server?

You need to specify INADDR_ANY to bind. You cannot bind the same socket to multiple ports, but you can certainly create multiple sockets, each listening to a different port.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM