networks – How to write a media server?

I have an existing application that downloads media files from the Internet. I want to write about him so I can broadcast the video while I download it. I see other programs for the same purpose that provide an https link that when opened with vlc, I can see the whole video and I can also search. I want to understand how they do it? Can any body suggest me some reading material or something similar?

Somewhere where I read that they were using sockets, I read a beginner's guide on socket. A little understood. But streaming and other things still seem strange to me.

I am doing c ++ from last year, and I am currently reading introduction to the cormen algorithms. I'm halfway there but now I want something related to the real world. I tried to read boost.asio. but I did not understand it I found it very complex