Click here to Skip to main content
15,892,746 members
Please Sign up or sign in to vote.
5.00/5 (1 vote)
See more: (untagged)
I never understand when to use either of these. People always talk that - "...can be transferred over TCP or HTTP...." why there is "Or" in between TCP and HTTP? i understand, HTTP internally rely on TCP for transporting.

1. When to use TCP or HTTP?
2. What extra HTTP can do which TCP does not?
3. Can anybody point me to a nice pictorial representation where the usage of TCP and HTTP depicted. (sorry for my dumb questions)

Thanks.
Posted
Updated 13-Oct-09 1:29am
v2

1 solution

You can't really compare them. In a protocol stack, HTTP would be above TCP/IP
assuming HTTP is using TCP/IP for its transpor protocol.

HTTP is often used with TCP/IP as its transport protocol but TCP/IP isn't required.


TCP/IP provides reliable transfer of a stream of bytes, and that's all.

HTTP is a request/reply protocol, often implemented using TCP/IP to transfer
data between clients and servers.


You could probably do a little research - I bet these are two of the most documented
protocols on the web...

HTTP[^]
TCP/IP[^]

 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900