python websocket handshake (RFC 6455)

前端 未结 1 1510
轻奢々
轻奢々 2020-12-30 14:48

I am trying to implement a simple websoket server on python, using RFC 6455 protocol. I took handshake format from here and here.

I am using Chromium 17 and Firefox

相关标签:
1条回答
  • 2020-12-30 15:21

    Your server handshake code looks good.

    The client code looks like it'll try to send a message before the (asynchronous) handshake completes however. You could avoid this by moving your message send into your websocket's onopen method.

    Once the connection is established, the server does not send or receive messages as plain text. See the data framing section of the spec for details. (Client code can ignore this as the browser takes care of data framing for you.)

    0 讨论(0)
提交回复
热议问题