如何从连接到Web服务器的任何客户端读取一些数据? [英] how can I read some data from any client connected a web server ?

查看:253
本文介绍了如何从连接到Web服务器的任何客户端读取一些数据?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

你好,
我的意思是,一个Web客户端通过具有页面的Web服务器从另一个Web客户端接收数据,这将在发送数据时显示该数据.
因此,我该如何对该Web服务器进行编程以获取目标.
并且非常感谢.

hello,
What I mean that a web client recieve data from another web client through a web server which has a page will display the data at the time as the data sent.
so how can I program this web server to get my target.
and Thanks a lot.

推荐答案

我认为您应该使用ajax调用,即ajax从另一个Web服务器获取数据,这将很容易为您服务.
i think you should use ajax call i.e ajax for getting data form the another web server this will work for you easily.


您无需对Web服务器进行编程以查找/获取客户端-相反,您需要进行编程.创建一个客户端,将其指向Web服务器(Web服务/数据库连接/套接字,无论如何),然后从服务器获取数据.

在您的方案中,您可以考虑使用双工服务.
You dont program your web server to find / get to the client - you program the other way round. Create a client, point it to the web server (web services / database connection / socket, whatever) and then fetch data from the server.

In your scenario, you might consider a duplex service as an option.


写道:​​


有一个客户端(信息发送者)和另一个客户端(接收者),实际上我想在发送者开始传输时(发送者开始传输时)实时将正弦信号从发送者发送到接收者,而又不存储该信号并再次发送.因此,我使用了Netscape Navigator,它每隔0.1s从源获取一次快照,并在接收器处显示图像.所以我认为我需要一台服务器来实现两个客户端之间的这种关系. (就像服务器MSN一样,那一次我想发送图像).


there is a client(sender of information)and another client (receiver) actually I want to send sinosoidal signal from sender to receiver at the real time( at the time the sender begin transmission) without stocking this signal and send it again. therefore I have used the Netscape Navigator that takes a snapshot every 0.1s from the source and display the image at the receiver. so I think I need a server does that relation between the two client''s. (Like server MSN but that time I want to send an image ) .



您必须使用Ajax/Javascript远程脚本来从客户端发送和接收数据.但是服务器将无法保持任何打开的连接,该连接可以发送接收方客户端附带的数据.相反,您的接收方客户端必须频繁地对服务器执行ping操作,并检查是否有可用数据.



You have to use Ajax / Javascript remote scripting for sending and receiving data from the clients. But the server wont be able to keep any open connection which can send data as it comes in with your receiver client. Instead your receiver client has to ping the server in frequent interval and check for any available data.


这篇关于如何从连接到Web服务器的任何客户端读取一些数据?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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