I have my own socket implementation supporting a connection to a regular tcp client. Now I would like to add websocket support to my server program. In this case, I will need to support handshaking protocols and messages, which are supported by major web browsers. I was able to handle the handshake, but was stuck in handling cropping and without cropping messages. Is there any existing C or C ++ library that handles the encoding and decoding of websocket message frames and supports the basic websocket protocols used by major web browsers?
Most of the current implementation I found (e.g. libwebsocket, websocketpp, etc.) implements its own server and client library, which means that I need to use their socket implementation. I do not want to do this because it will require me to change many things in my current program, and this is not an option for me. I just need a simple library that handles the encoding and decoding of the websocket framework (and / or also handles part of the handshake, but is optional).
source share