发送消息给客户 [英] send message to client
本文介绍了发送消息给客户的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
你好
我有2个程序,第一个是服务器",第二个是客户端
客户端连接到服务器并发送消息
但服务器无法连接到客户端并发送消息:(
什么问题?
服务器如何连接到客户端并发送消息?
我在服务器中使用此代码
hello
I have 2 program , the first "server" and the second is the client
the client connect to server and send message
but the server can''t connect to client and send message :(
what the problem ?
how can the server connect to client and sent message ?
I use this code in server
TcpClient tc = new TcpClient();
tc.Connect(ip, int.Parse("5050"));
SendMsg(tc, "hello");
怎么了?请帮助:(
感谢
what is the wrong ? please help :(
thanks
推荐答案
你好
看这个:
在Windows窗体之间共享数据.
尤其是这一部分:"是否有一种方法可以将消息从客户端发送回服务器?"
Hello
Look at this:
Sharing data among Windows Forms.
Especially this part: "Is there a way to send a message back to the server from the client?"
这篇关于发送消息给客户的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文