简体   繁体   English

桌面应用程序和Windows Mobile Compact Framework c#之间的通信

[英]Communication between Desktop Application and Windows Mobile Compact Framework c#

I am writing a desktop application that will have to communicate with a windows mobile application in the compact framework 3.5. 我正在编写一个桌面应用程序,该应用程序必须与紧凑框架3.5中的Windows Mobile应用程序进行通信。 The communication must occur over the internet between these two applications to send data between them on command if the connection is available. 这两个应用程序之间必须通过Internet进行通信,以在命令可用时在它们之间发送数据。

The system will send messages and objects like Images between device and desktop application and check to see if the desktop can see the device by sending a command and have a timeout on response. 系统将在设备和桌面应用程序之间发送消息和对象(例如图像),并检查桌面是否可以通过发送命令查看设备并响应超时。 (Application will then know that the device is not available). (然后,应用程序将知道该设备不可用)。 The mobile device will send a message to the desktop application when online as well that the desktop knows that the mobile is connected(Type of registering for communication) 联机时,移动设备还将向桌面应用程序发送一条消息,表明桌面知道移动设备已连接(通信注册类型)

Can someone please inform me of the best way to follow to accomplish this. 有人可以告诉我实现此目标的最佳方法。

I did some research and found this site is near to something like event based driven communication I would want but do not have the availability of setting up an email on each device. 我进行了一些研究,发现该站点接近我想要的基于事件的通信,但无法在每个设备上设置电子邮件。

Battery life and internet open on device is not an issue. 电池寿命和设备上的互联网打开都不是问题。

Should I check in on working with the System.Net.Socket class for this type of communication between the two application and if so how will I set up so firewalls will not interfere and have my desktop application be seen over the internet by the mobile application ? 我是否应该检查是否使用System.Net.Socket类在两个应用程序之间进行这种类型的通信,如果可以,我将如何设置以便防火墙不会干扰并且移动应用程序可以在Internet上看到我的桌面应用程序?

Hope someone can spread some light over this for me, if you have a answer please provide a link so I can read up on it. 希望有人可以帮我解决这个问题,如果您有答案,请提供链接,以便我阅读。

your description is something basic. 您的描述是基本的东西。 OK, regardless of what TCP/IP communication you decide for (HTTP, sockets) you must always have your internet router forward packages on a specified incoming port to your PC and the firwall must accept these incoming requests. 好的,无论您决定使用哪种TCP / IP通信(HTTP,套接字),都必须始终使Internet路由器将包在指定的传入端口上转发到PC,并且防火墙必须接受这些传入请求。

So, the device will have to send data to the PC and vice versa. 因此,设备必须将数据发送到PC,反之亦然。 So you need a server and a client on the PC and on the PC. 因此,您需要在PC和PC上都具有服务器和客户端。

Possibly you can use an already available cloud like Dropbox to exchange files between PC and device. 可能您可以使用Dropbox等已经可用的云在PC和设备之间交换文件。

What are about your skills in socket programming? 您在套接字编程方面的技能是什么? The main server (PC) must be written multithread to be able to server multiple device client requests. 必须将主服务器(PC)编写为多线程,才能处理多个设备客户端请求。

A simple socket comm is done in my SocketWedge [http://www.hjgode.de/wp/2010/05/27/transmit-data-from-winmo-device-to-pc-socketwedge-and-socketsend/]. 我的SocketWedge [http://www.hjgode.de/wp/2010/05/27/transmit-data-from-winmo-device-to-pc-socketwedge-and-socketsend/]中完成了一个简单的套接字通讯。 A way of multithreaded communication using a web server on the device is available here [http://www.hjgode.de/wp/2012/10/19/windows-mobile-a-simple-web-server-with-extended-features/]. 可在此处使用设备上的Web服务器进行多线程通信的方法[http://www.hjgode.de/wp/2012/10/19/windows-mobile-a-simple-web-server-with-extended-特征/]。

Will SQL with data synchronization be a possible choice? 带有数据同步的SQL是否可能成为选择?

Can you describe the application in more detail? 您可以更详细地描述应用程序吗?

~josef 〜约瑟夫

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM