I have just started doing network programming with C, thus, am still very shallow in that topic.
However, for a TCP connection, I do know that we have (should) do the following procedures:
5. send(), recv(), write() or read(); etc...
My problem is, I would like my server to do what telnet does when the client types the following message from the client machine:
GET /my_web_server.html HTTP/1.0
The server will respond with the html codes of the page.
I dont see how it works. Currently I only know how to send a message to the server from client, and the server will send back an identical message back to the client. Thus, not much dynamic interactions.
By any chance, could it be by default if we use port 80 (web-server port) as the server, with IP address "my_web_server", the server will AUTOMATICALLY send the html codes back to the client. But how????
I hope you understand what I mean.
Any help will be appriciated.
p/s: I am running Linux btw.