dpallot / simple-websocket-server

A python based websocket server that is simple and easy to use.
951 stars 321 forks source link

send header and message together #5

Closed dyfer closed 10 years ago

dyfer commented 10 years ago

Hi, I was using your websocket implementation and when I'd send two messages in a short period of time (initiated simultaneously), I'd often get an error "Could not decode a text frame as UTF-8" in Google Chrome. I believe this was because you are sending header and message buffers sequentially. I made changes to send them as a concatenated message and it seems working fine. Do you think there are any problems with my solution? Cheers

dpallot commented 10 years ago

Hi dyfer, Seems totally reasonable to me. I'll merge it. Cheers