Skip to main content
gamedev.net
🔒 Locked

HTTP Networking

Started by MadProgrammer Nov 4, 2002 at 11:59 AM 2 replies 550+ views
Original Post
MadProgrammer
MadProgrammer
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
moore52
moore52
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.
Arild Fines
Arild Fines
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
--AnkhSVN - A Visual Studio .NET Addin for the Subversion version control system.[Project site] [IRC channel] [Blog]
intransigent-seal
intransigent-seal
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
The best thing about the internet is the way people with no experience or qualifications can pretend to be completely superior to other people who have no experience or qualifications.

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.