简体   繁体   English

用于连接到客户端桌面应用程序的网站

[英]Website to connect to a client desktop application

I have an application written in VB.net that runs on a clients pc. 我有一个用VB.net编写的在客户端PC上运行的应用程序。 I also have a website written in mostly javascript, http and php. 我也有一个主要用javascript,http和php编写的网站。 The thing I want to do is to connect the website to the application , so that when ie a certain button is pressed, it connects to the client application and raises an event. 我想做的就是将网站连接到应用程序 ,以便当按下某个按钮时,它将连接到客户端应用程序并引发一个事件。

I have tried approaches like TCP socket communication by having a TCP Socket Server running in the background of the client application. 我已经尝试通过在客户端应用程序的后台运行TCP套接字服务器来尝试类似TCP套接字通信的方法。 I can connect to the server by having a client connection from another vb.net application, but whenever I try to connect through PHP it fails. 我可以通过与另一个vb.net应用程序建立客户端连接来连接到服务器,但是每当我尝试通过PHP连接时,它都会失败。 (I have only tried PHP since server-side scripting seems to make more sense in this case) (我只尝试过PHP,因为在这种情况下服务器端脚本似乎更有意义)

Another approach I have tried is to have an HTTP server running in the background of my desktop application and then have a PHP script connect to it, that fails as well. 我尝试过的另一种方法是让HTTP服务器在桌面应用程序的后台运行,然后将PHP脚本连接到该服务器,这也会失败。

One thing that I've been thinking about as a last resort is to simply have a textfile on the webserver and a PHP script writing to it after given parameters and then have the client application to read the file every few seconds. 我一直想做的一件事是,在网络服务器上简单地放置一个文本文件,并在给定参数之后编写一个PHP脚本,然后让客户端应用程序每隔几秒钟读取一次该文件。 But this wouldn't be very efficient with larger amounts of data, would it? 但这对大量数据不是很有效,对吗?

What is the proper way of doing this? 正确的做法是什么? If you have any questions about the code I've been using, feel free to ask. 如果您对我一直在使用的代码有任何疑问,请随时提出。

If you don't get my blurry explanation, try this image: http://i.imgur.com/8njxVFj.png 如果您没有得到我的模糊解释,请尝试以下图像: http : //i.imgur.com/8njxVFj.png

Thanks in advance. 提前致谢。

为了使您的数据更有条理,我建议您将数据存储在数据库服务器上,例如mysql(免费)。

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

相关问题 如何将Twilio与Wordpress连接以在桌面网站上发送应用程序链接 - How to connect Twilio with Wordpress to send app link on desktop website 桌面应用程序如何从网站获取信息? - How does a desktop application get information back from a website? 网站与客户端应用程序之间的服务器通信 - Server communication between website and client application 将桌面C#应用程序连接到在线MySQL数据库 - Connect desktop c# application to online mySql databse 将数据从我的远程网站中的javascript函数传递到桌面应用程序上的ac#应用程序 - Passing data from a javascript function in my remote website to a c# application on my desktop application 如何从我的网站/ Web应用程序连接到安全的FtP? - How to connect to a secure FtP from my website/web application? PHP应用程序到桌面应用程序 - PHP application to Desktop Application 如何将客户端连接到Elastic Beanstalk(AWS)上的PHP应用程序 - How to connect a client to a PHP application on Elastic Beanstalk (AWS) 如何使用php将桌面网站从桌面上的移动网站上移开 - how to direct desktop website away from mobile website on desktop with php 从手机网站切换到桌面网站? - Switch from mobile to desktop website?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM