Pull requests

#1 Merged
Repository
lawnsea lawnsea
Branch
stable
Repository
Jeffrey Jeffrey
Branch
stable

Version 7 support

Author
  1. Lon Ingram
Reviewers
Description

I've implemented handler code and a WebSocket subclass to support version 7 of the protocol as well as 75 and 76. I tested with gevent-socketio stable in my pyramid app and it works.

Since the newer spec introduces the concept of opcodes, I return a tuple of (opcode, payload/result) from wait. For compatibility with gevent-socketio, however, the WebSocketVersion7 constructor accepts a compatiblity_mode keyword arg which defaults to True. When the corresponding instance attribute is True, wait behaves like gevent-socketio expects: it doesn't return PINGs and PONGs, returns None for CLOSE and returns just the payload for BINARY and TEXT.

I plan to implement version 8 support sometime next month.

I didn't rev the version number b/c I wasn't sure what one you would want to use next.

  • Learn about pull requests

Comments (0)