开发者

CGI/Python server push

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

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜