开发者

CGI/Python server push

开发者 https://www.devze.com 2023-01-29 20:30 出处:网络
Is it possible to write a simple python script which handles real-time server pushin开发者_JS百科g of data back to the client when data is available?\"Yes, but\":

Is it possible to write a simple python script which handles real-time server pushin开发者_JS百科g of data back to the client when data is available?


"Yes, but":

You can keep the connection between the client and server live; but this can take significantly more server resources.

Edit: If you want to do this, see

  • Python Comet Server
  • How to implement Comet server side with Python?
  • The latest recommendation for Comet in Python?

You can have the client register an IP address which the server can contact, but you will run into a huge amount of trouble with client-side firewalls.

Or you can just do what most services do, and have the client poll the server occasionally.

0

精彩评论

暂无评论...
验证码 换一张
取 消