File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Sockets and Internet Protocols and the fly likes woohoo! i finally understand sockets Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Sockets and Internet Protocols
Bookmark "woohoo! i finally understand sockets" Watch "woohoo! i finally understand sockets" New topic

woohoo! i finally understand sockets

Randall Twede
Ranch Hand

Joined: Oct 21, 2000
Posts: 4351

i had to write a research paper for my data communications class, so i chose sockets since i was kind of vague about them. here is the conclusion:

Sockets are used when programs require lower-level network communication. Examples include web browser/web server, ftp client/ftp server, e-mail client/e-mail server, file sharing programs (where each installation contains both a client and a server), and multi-player game programs (over the Internet or using LANs).
Applications that use URLs depend on another application that uses sockets. For example, suppose you create an e-commerce site. The user's browser sends an HTTP request (to the server's URL). Your server-side program sends an HTTP response (to the client's URL). The web server you are using to host your site, and the client's browser, create the sockets and takes care of the lower-level details for you.
Creating applications that use sockets is more complicated than creating applications that use URLs because sockets operate at a lower level in the OSI stack. You have to establish protocols, and also decide which ports to use. It is much easier to send a response to an HTTP request than it is to write both a client and a server program, establish a protocol, create the sockets, and coordinate communication between those sockets.

Visit my download page
I agree. Here's the link:
subject: woohoo! i finally understand sockets
It's not a secret anymore!