The client application in C ++ transmits data to the HTTP server - client ID (to indicate presence), webcam frames (on request), desktop screenshots (on request). If it would be possible to broadcast either a camera or a display, then the question would not be, but the task should be the possibility of simultaneous broadcasting.
Through a client socket, the client broadcasts its ID with information about whether it can use the camera (not everyone has it). When a server responds with a request to broadcast a camera, desktop, or all, the client creates a separate stream for the camera and a separate stream for the desktop, because the frame broadcast intervals are different (if you can send a frame from a camera to 6 kb 20-25 times a second, KB display no more than 2, so that the network does not overload).
And here I have a creative dead end because of the possible incomplete understanding of the operation of sockets: Is it possible to use one socket for these threads? The data volumes are decent, they will not interfere with each other on the same socket with Content-Transfer-Encoding: binary ?