再次理解websocket in Python

  • websocekt

    《理解full-duplex||IETF||RFC||Web IDL||W3C》

    RFC6455

    《廖雪峰的官方网站》

    WebSocket is a computer communications protocol, providing full-duplex communication channels over a single TCP connection.

    The WebSocket protocol was standardized by the IETF as RFC 6455 in 2011, and the WebSocket API in Web IDL is being standardized by the W3C.

    WebSocket is distinct from HTTP, RFC 6455 states that WebSocket “is designed to work over HTTP ports 443 and 80 as well as to support HTTP proxies and intermediaries”. To achieve compatibility, the WebSocket handshake uses the HTTP upgrade header to change from the HTTP protocol to the WebSocket protocol.

    The name “WebSocket” was coined by Ian Hickson and Michael Carter.

  • Websocket in Python

  • websocket-client

    github

    pip install websocket-client

    import websocket

  • websockets

    github

    pip install websocekts

    import websocekts

    websocket-client just support client creation, but the websockets support client and server.

    新手有限使用websocket-client,简单,容易上手.

猜你喜欢

转载自blog.csdn.net/The_Time_Runner/article/details/111409448