MostAwesomeDude / txWS

Twisted WebSockets
Other
94 stars 29 forks source link

Add support for sending binary messages. #19

Closed kpreid closed 10 years ago

kpreid commented 11 years ago

For issue MostAwesomeDude/txWS#15: adds sending, but not receiving, binary messages.

I needed binary messages in my app and this was the simplest compatible thing that I could think of. Any comments on the API design and code are welcome.

Binary support must be specifically requested via .setBinaryMode(True) so as to preserve backwards compatibility with the previous behavior that a str object would be sent as a text frame. I'd be happy to not have such a mode switch, but I didn't want to break existing code.

csaftoiu commented 11 years ago

Yes! Please accept this pull request. Just encountered this issue myself. I resolved it by making a BinaryWebSocketProtocol/Factory but either way works really.

MostAwesomeDude commented 10 years ago

LGTM. Sorry for taking so long to deal with this. I blame work. Can I do that?

csaftoiu commented 10 years ago

Nope, I won't allow it! By which I mean, yes. Wait... ?? Profit.

On Mon, Jan 13, 2014 at 12:38 AM, Corbin Simpson notifications@github.comwrote:

LGTM. Sorry for taking so long to deal with this. I blame work. Can I do that?

— Reply to this email directly or view it on GitHubhttps://github.com/MostAwesomeDude/txWS/pull/19#issuecomment-32146538 .