#1 Merged
lawnsea lawnsea
Jeffrey Jeffrey

Version 7 support

  1. Lon Ingram avatarLon Ingram

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.

Comments (0)

Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.