连接远程系统时想要一个接受按钮。 [英] Want a accept Button while connecting remote system.
问题描述
您好我在局域网中创建了一个聊天窗口应用程序并且工作正常
但我的问题是每当服务器想要连接到客户端PC时,它应该显示客户端系统中的弹出窗口用于接受来自服务器的连接,然后才建立连接,
请指导我如何实现这一点。
我在c#中使用system.Net.socket命名空间。
Hi i created a chating window application in a lan network and its working fine
but my question is "whenever server want connect to client pc, it should show a pop up window in client system for accepting connection from server and then only connection should established,
please guide me how to achieve this.
I am using system.Net.socket namespace in c#.
推荐答案
您好Ashwani,
在实际场景中,客户端与服务器连接。我希望在你的情况下它是相反的。
关注此链接
http://msdn.microsoft.com/en-us/library/kb5kfec7%28v=vs.110%29.aspx [ ^ ]
这里是服务器端
Hi Ashwani,
In actual scenario client gets connected with server. I hope in your case it is opposite.
follow this link
http://msdn.microsoft.com/en-us/library/kb5kfec7%28v=vs.110%29.aspx[^]
Here at server side
sender.Connect(remoteEP);
A在此行中,您可以显示一条警告消息(即使您在EndPoint remoteEP中获取请求者的IP地址),也可以显示一个对话框。
如果对话结果为是然后你可以继续
否则你可以关闭连接
after this line you can have a alert message that (even u get the IP address of requester in EndPoint remoteEP) for user a Dialog box can be displayed.
If the Dialog result is yes then you can continue
else you can close the connection
sender.Close();
希望这很有用。
问候,
Arun
Hope this is useful.
Regards,
Arun
这篇关于连接远程系统时想要一个接受按钮。的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!