Ah yes. The problem is that 8a0a4722 changed prints to self.vmsg/warn. I would like encode_hybi and decode_hybi to remain as static methods (i.e. pure-ish functions that don't assume they are part of an initialized object and can be invoked by themselves). I see three options:

- switch back to prints. This means that not all output is capture by the logger
- pass in an optional logger function (i.e. self.warn) and use that if it's set
- Change the first output (397) to an exception (receiving an unmasked frame is a spec violation technically), and just remove the try catch around 404 and 406 and just allow the exception to bubble. Or possibly throw a typed exception that can be caught and printed higher up.