Re: [libmicrohttpd] websocket broadcast to all clients

2022-07-20 Thread David Gausmann
Hi Bill, maybe the libmicrohttpd example "src/examples/websocket_chatserver_example.c" could be interesting for you. Some time ago I wrote an extension for libmicrohttpd to support the Websocket protocol. This is the example file for it. But currently you only get the extension, if you compile

Re: [libmicrohttpd] websocket broadcast to all clients

2022-07-19 Thread Christian Grothoff
Dear Bill, You should use a "MHD_NotifyConnectionCallback" to be notified about when MHD is 'finished' with a connection. Then, you can insert the connection when the websocket mode is started into a data structure (usually a doubly-linked-list (DLL) is better than an array) and remove it during

[libmicrohttpd] websocket broadcast to all clients

2022-07-19 Thread Bill Bowling
I've been using libmicrohttpd for many years and have recently become interested in using websockets. I have a working version that seems to do what I want with a single client. But, I want to broadcast a response to all connected clients. I've searched through many posts and documents but have