[英]Multi client connect through same IP to server
I have this scenario in mind, can I connect group of clients that have the same IP -Located on the same computer- to server which recognize them by their username and password and not by their IPs .. I want to know if this possible. 我想到了这种情况,我可以将位于同一台计算机上的具有相同IP的一组客户端连接到服务器,这些客户端可以通过其用户名和密码而不是其IP来识别它们。.我想知道是否可能。
I'm using this template of TCP/IP application. 我正在使用此 TCP / IP应用程序模板。
You can start (almost) any number of clients on one machine that connect to the same server. 您可以在一台计算机上(几乎)启动连接到同一服务器的任何数量的客户端。 The only restriction is the number of ports you have available.
唯一的限制是可用端口的数量。 A client socket is identified by an ipaddress:port pair, so if you start each client on a different port, it will work.
客户端套接字由ipaddress:port对标识,因此,如果您在不同的端口上启动每个客户端,它将起作用。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.