implement candidate compromise proposal for websockets

1. Text and binary frames are accepted
2. Text frames are sent by default
3. Binary frames are sent to clients who negotiate `binary.ircv3.net`
4. Non-UTF8 data is not accepted (enabling websockets still enables UTFONLY)
This commit is contained in:
Shivaram Lingamneni 2021-02-24 14:08:04 -05:00
parent 640572e151
commit d547d05205
3 changed files with 17 additions and 12 deletions

View file

@ -691,7 +691,7 @@ func (client *Client) run(session *Session) {
} else if err != nil {
var quitMessage string
switch err {
case ircreader.ErrReadQ, errWSBinaryMessage:
case ircreader.ErrReadQ:
quitMessage = err.Error()
default:
quitMessage = "connection closed"