简体   繁体   English

从服务器向客户端发送数据

[英]Sending data from Server to Client

I want to send data from server to client when server is updated. 我想在服务器更新时将数据从服务器发送到客户端。 Normally client sends a request to server and server response to the client. 通常,客户端向服务器发送请求,服务器向客户端发送响应。 Is there any way to send data to a specific client directly? 有什么方法可以直接将数据发送到特定客户端?

Pls guide me. 请指导我。

You seem to be after what is known as Push Technology : 您似乎在追求所谓的Push Technology

Push, or server push, describes a style of Internet-based communication where the request for a given transaction is initiated by the publisher or central server. 推送或服务器推送描述了一种基于Internet的通信方式,其中对给定交易的请求由发布者或中央服务器发起。 It is contrasted with pull, where the request for the transmission of information is initiated by the receiver or client. 与拉(Pull)形成对比,拉(Pull)是由接收方或客户端发起信息传输请求的。

This and this previous SO posts seem to discuss what you are after. 之前的SO职位似乎讨论你所追求的。

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

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