开发者

Winsock Port Listener

开发者 https://www.devze.com 2023-01-26 20:40 出处:网络
I\'ve done a TCP por开发者_如何学编程t 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

I've done a TCP por开发者_如何学编程t 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.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号