Archived

This topic is now archived and is closed to further replies.

MadProgrammer

HTTP Networking

Recommended Posts

how do i do networking stuff using http instead of tcp/ip? what''s different? i have a server/client thingy that works fine, but i need to implement http networking so it can go thru my school''s http proxy / firewall thingy. anyone know any good sites about this? i''m good with tcp/ip networking and winsock and stuff, and am good at programmin in general too, but not enghlish m@ the madProgrammer

Share this post


Link to post
Share on other sites
I dont get you.
Http is going on TCP/IP its just like ftp, simply connect to xxx.xxx.xxx.xxx:80 (or what port you have, proxy usually on 8080), send something like "GET ../index.html" and you will recive index file. Thats how http and ftp works, so why you asking about tcp/ip.
If you want to write http server, do it just like normal server, you have only implement command GET XXX; XXX = requested file, and send XXX file.
Good example will be Apache source.

Share this post


Link to post
Share on other sites
HTTP is an application protocol - it functions on top of TCP/IP.



God puts an apple tree in the middle of the Garden of Eden and says, do what you like guys, oh, but don''t eat the apple. Surprise surprise, they eat it and he leaps out from behind a bush shouting "Gotcha." It wouldn''t have made any difference if they hadn''t eaten it... because if you''re dealing with somebody who has the sort of mentality which likes leaving hats on the pavement with bricks under them you know perfectly well they won''t give up. They''ll get you in the end. -- Douglas Adams

Share this post


Link to post
Share on other sites
As has been said, HTTP is an application level protocol, which usually sits on top of tcp/ip.
I find it easiest to think of the protocols as a stack, where the output of each protocol feeds into the input of the next (starting with the bare message, and ending with the individual packets). You can have as many protocols at different levels as you want, each adding their own headers and/or footers to the data fed to them before passing it on.

Anyway, that''s all nearly irrelevant since you say you know winsock (just background info for anyone that wants it).

If you need to learn HTTP itself, then I think the best place to look would probably be the RFC''s. Available at IETF (The Internet Engineering Task Force), specifically, have a look at RFC 2616, and possibly search for HTTP in the RFC index, and see what that brings up.

Hope that helps,

John B

Share this post


Link to post
Share on other sites