• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

woohoo! i finally understand sockets

 
Ranch Hand
Posts: 4716
9
Scala Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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:


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.

reply
    Bookmark Topic Watch Topic
  • New Topic