vb.net tcpserver切换客户端 [英] Vb.net tcpserver switch client

查看:171
本文介绍了vb.net tcpserver切换客户端的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述


我创建了tcpclient和tcpserver evrything效果很好.我可以互相发送消息.但是,如果有另一个客户端连接到同一tcpserver,该怎么办.我是否通过将ipendpoint设置为他的ip直接从客户端发送消息?或者我需要将消息发送到tcpserver,然后从服务器将其发送到另一个客户端.

我一直在互联网上寻找答案,但找不到解决方案.如何向其他客户端发送私人消息.请帮忙.
谢谢您

Hi,
I have created tcpclient and tcpserver evrything works fine. I can send messages to each other. But what if there is another client connected to same tcpserver. Do i send him message directly from client by setting ipendpoint as his ip ? or i need to send message to tcpserver and then from server send it to another client.

I keep looking answer in internet but i can''t find solution. how to send private message to other client. please help.
thank you

推荐答案

您可以执行任何操作.您要做的就是满足您的要求.

但是,请记住,Windows的任何工作站版本最多仅允许10个入站连接.因此,如果您选择让客户端与客户端建立连接,则每个客户端最多只能有10个其他客户端直接与之通信.

更好的方法是将所有流量路由到维护转换会话的中央服务器,这样您就不会遇到10个连接限制. Winodws的服务器版本没有此限制.
You can do either. What you do is up to your requirements.

But, keep in mind that any workstation version of Windows will only allow 10 inbound connections max. So, if you opt for having client to client connections, each client will be limited to a maximum of 10 other clients talking directly to it.

A better way would be to route all traffic through a central server that maintains a conversion session so you don''t run into the 10 connection limit. Server editions of Winodws don''t have this restriction.


这篇关于vb.net tcpserver切换客户端的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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