Giter Site home page Giter Site logo

py_websocket's Introduction

PY WebSocket

基于Web页面实时推送技术的demo

使用方法

1. 基于HTTP

运行命令:python http_server.py

  • 轮询(polling)
    打开:http_polling_client.html
  • 长轮询(long-polling)
    打开:http_long_polling_client.html
  • iframe流(iframe-streaming)
    打开:http_iframe_streaming_client.html

2. 基于WebSocket

运行命令:python websocket_server.py
打开:websocket_client.html
多打开几个页面,连接、发送消息

备注

代码和实现的功能很简单,仅是一个小demo
更多关于Web页面实时推送技术的知识,参见:http://www.wenyuanblog.com/blogs/realtime-messaging-and-websocket.html

py_websocket's People

Contributors

wenyuan avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.