Client Server通信接受的方法。 [英] Client Server communication accepted methods.

查看:78
本文介绍了Client Server通信接受的方法。的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个客户端应用程序,它将部署在众多客户端PC上。客户端将以特定间隔与服务器通信。当新的更新可用时,服务器还将随机地与客户端通信。我正在考虑使用wcf自托管服务,因为我的客户端应用程序将部署在具有各种配置的系统上。我没有找到WCF sel托管服务作为一个有前途的选择。我有以下问题/疑问



1)客户< - >服务器通信最受欢迎的方式是什么?



2)服务器如何知道客户端更改IP地址?

I have a client application which will be deployed on multitude of client PC''s. The client will communicate with the server at certain intervals. Server will also communicate with the clients randomly when a new update is available. I was contemplating on wcf self-hosted services, as my client app is going to deployed on systems with variety of configuration. I am not finding WCF sel-hosted service as a promising option. I have following questions/doubts

1) What is the most accepted way of client<->server communication?

2) How do the server know about clients changing ip address?

推荐答案

1)它们数量众多,正是您想要的使用完全取决于您,并取决于您的应用程序应该做什么。对于一般的通信媒介,WCF是一个不错的选择。



2)它不可能。 IP地址是服务器与客户端通信的唯一方式:如果客户端更改了其IP地址,则服务器无法再与其联系,并且IP地址几乎可以立即由其他计算机重复使用。除非客户端可以对服务器说我将要将我的IP地址更改为xxx(并且通常当您更改IP时它由ISP分配并且您事先无法知道)然后它将无法工作。如果您的意思是如何检测到该用户已经更改了IP地址,因为他想滥用我们的服务,那么您只能存储cookie并在新用户连接时进行检查。
1) There are a huge number of them, exactly which you want to use is totally up to you, and will depend on what your application is supposed to do. WCF is a good choice though for a general communications medium.

2) It can''t. The IP address is the only way the server can communicate with a client: if the client changes it''s IP address then the server can no longer contact it, and the IP address could be re-used by a different computer almost instantly. Unless the client can say to the server "I am about to change my IP address to xxx" (and generally when you change IP it is assigned by the ISP and you can''t know it in advance) then it will not work. If you mean "how can I detect that this user has changed IP address because he wants to misuse our services" then you are limited to storing a cookie and checking it when a new user connects.


这篇关于Client Server通信接受的方法。的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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