关于客户端和服务器之间的tcp连接 [英] about tcp connection between client and server

查看:260
本文介绍了关于客户端和服务器之间的tcp连接的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

你好,
我们可以使用相同的端口地址将多个客户端连接到服务器吗?
Thnx
问候,
Vishavdeep Goyal

Hello,
Can we connect multiple clients to a server with the use of same port address?
Thnx
Regards,
Vishavdeep Goyal

推荐答案

请参阅我过去提供的关于类似问题的设计草图:如何将byte []发送到另一台PC [ ^ ],
在局域网上与两个Windows应用程序进行通信. [ ^ ].

—SA
Please see this design sketch I provided in my past answer to the similar question: Multple clients from same port Number[^].

You can use TCP networking on different level. Please see my overview of them in my past answers:
how i can send byte[] to other pc[^],
Communication b/w two Windows applications on LAN.[^].

—SA


是的,我们可以通过同一端口将多个客户端连接到服务器.在服务器上,我们可以指定与套接字(欢迎套接字)的连接的阈值数.一旦连接,客户端将通过欢迎套接字分配的另一个端口进行操作.
yes , we can connect multiple clients to a server through same port. At the Server we can specify a threshold number of connections to a socket(welcome Socket). once connected the client will carry operations through another port assigned by welcome socket.


这篇关于关于客户端和服务器之间的tcp连接的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆