File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

is HTTP is connection oriented

 
Sudarshan Muramreddy
Greenhorn
Posts: 16
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi All,
I am really confused to decide weather HTTP is a Connection oriented(I though may be this is based on TCP ,which is connection oriented) or is just connection less can any once clarify this please.

Thanks,
Sudarshan
 
Jose Botella
Ranch Hand
Posts: 2120
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Welcome to the Ranch Sudarshan!

It's connectionless because requires a new connection for each request. That is, it doesn't maintain a single connection for the whole communication between client and server.
[ June 08, 2004: Message edited by: Jose Botella ]
 
Stan James
(instanceof Sidekick)
Ranch Hand
Posts: 8791
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
This is interesting and confusing for a couple reasons.

For one, we often talk about web server sessions. The server maintains some state and remembers the user and what they're doing and that sounds a lot like the definition of a connection. The distinction is that web servers build their session stuff on top of the HTTP protocol, and session is not part of the HTTP protocol. You can have HTTP servers with no sessions.

Another confusing bit is that IP is connection oriented. HTTP makes an IP connection for the duration of one HTTP request-response and then breaks it. If you read up on HTTP there is a three part handshake - three IP messages - to one request. I'm foggy on this but it's something like
Client: I'd like to send you a message
Server: Ok, send me a message
Client: Here's the message.

I think it's cool that we run connection oriented web sites over connectionless HTTP over connection-oriented IP over connectionless TCP. Protocol stacks can be fun.
 
Sudarshan Muramreddy
Greenhorn
Posts: 16
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks guys ...Now i am clarified
 
Jose Botella
Ranch Hand
Posts: 2120
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
IP is connectionless and TCP is connection oriented.
 
Stan James
(instanceof Sidekick)
Ranch Hand
Posts: 8791
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks, Jose. I passed my networking class, but instantly forgot most of it.
 
tommy k. lee
Greenhorn
Posts: 20
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Based on the OSI 7-layers model, HTTP is an application layer protocol. (layer 7). It uses IP and TCP (layer 3 and layer 4) protocols as its transport. It does NOT support UDP.

Since HTTP uses TCP, it is therefore connection-oriented.

However, what confuses most people is that each web page requests opens multiple HTTP connections to the web server. For instance, if a web page has 5 images, the web browser will likely open 5 different HTTP connections to the web server. After each image is delivered, the connections are closed one-by-one.

This is based on the request-response nature of HTTP. Even though HTTP connections are opened and closed rapidly, the HTTP protocol is connection-oriented since it uses TCP.
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic