Crow icon indicating copy to clipboard operation
Crow copied to clipboard

#692 Add the possibility to specify "Sec-WebSocket-Protocol"

Open KaSSaaaa opened this issue 1 year ago • 8 comments

I took the liberty to add some documentation as well. Feel free if you have any feedback :)

KaSSaaaa avatar Jul 29 '23 21:07 KaSSaaaa

I could use your split function in my websocket compression PR, if yours is merged first :D

MichaelSB avatar Jul 29 '23 22:07 MichaelSB

I rewrote find_first_of algorithm and put it in utility.h :)

KaSSaaaa avatar Jul 30 '23 08:07 KaSSaaaa

If I don't miss it, I think a getter is needed for the selected subprotocol in the connection. Otherwise looks good to me.

MichaelSB avatar Jul 30 '23 09:07 MichaelSB

Currently, the "subprotocol_" is only a private variable and is only used in the Connection::start but I can add a getter in the interface and implementation if it's needed.

KaSSaaaa avatar Jul 30 '23 09:07 KaSSaaaa

I think that's it :) I asked for the getter, because users must be able to know which subprotocol was selected and probably switch code paths accordingly.

MichaelSB avatar Jul 30 '23 10:07 MichaelSB

build fails on ubuntu at least, other os will run later.

gittiver avatar Jan 16 '24 18:01 gittiver

Apparently missed the include of for utility::find_first_of ...

KaSSaaaa avatar Jan 16 '24 21:01 KaSSaaaa

May I ask you also to add unit tests?

mrozigor avatar Mar 09 '24 14:03 mrozigor