Hi,
This is quite easy. Actually, there are severela possibilities. Basicly:
1) Use low level functions - if you write your code well, it can we event portable between Windows and Linux.
2) Use some library - this solution can be (but doesnt have to be) portable.
So:
If you want to use the firtst option you shell study function
socket,
bind,
listen and
accept. These functions aree usually called by a TCP server in order to start waiting and accepting connections. You will find pretty good examples how to use these function in the links above as well. BUT, be aware that HTTP protocol is a text protocol, and so you will have to parse and all possible HTTP-request and send all possible HTTP-responses in your code. And THAT will be really tedious to write !!!
Perhaps I would recommend to use some prepared library or API. If you are going to writ the server app for Windows, you might use
WinInet API.
However, dont forget to make your server multithreaded, so that it can serve many client requests/connections at one time. This would require to create a thread for each incoming client connection. This thread would serve the client and then termionate. This is quite a difficult topic, if you are a beginer, but if you want to read about it, you can find some info good in MSDN documentation.
Best Regards,
J. K.