Crow
Crow copied to clipboard
#692 Add the possibility to specify "Sec-WebSocket-Protocol"
I took the liberty to add some documentation as well. Feel free if you have any feedback :)
I could use your split function in my websocket compression PR, if yours is merged first :D
I rewrote find_first_of algorithm and put it in utility.h :)
If I don't miss it, I think a getter is needed for the selected subprotocol in the connection. Otherwise looks good to me.
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.
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.
build fails on ubuntu at least, other os will run later.
Apparently missed the include of
May I ask you also to add unit tests?