• 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

why we use socket programming

 
Ranch Hand
Posts: 1325
1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
i need to know what is the advantage of using Socket programming as there are other protocols above it(HTTP,TCP....)?
 
Greenhorn
Posts: 22
Mac Netbeans IDE Ruby
  • Likes 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Sam,

First off, socket programming is not a protocol and is necessary for network programming. In a nutshell, protocols such as HTTP, TCP, UDP, ect - would not have a means to "communicate" without socket programming. Basically, socket programming provides the logical interface that protocols use for sending and receiving data over a network. This link will take you to Oracle's socket tutorial:

http://docs.oracle.com/javase/tutorial/networking/sockets/

I hope the above link helps you gain a deeper understanding of sockets programming in Java. Good luck!

Steve
 
shawn peter
Ranch Hand
Posts: 1325
1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks
 
Rancher
Posts: 2759
32
Eclipse IDE Spring Tomcat Server
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
TCP protocol is not above sockets. The socket API allows you to communicate using TCP. From a programmers POV, socket programming IS TCP
 
author
Posts: 23951
142
jQuery Eclipse IDE Firefox Browser VI Editor C++ Chrome Java Linux Windows
  • Likes 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Jayesh A Lalwani wrote:TCP protocol is not above sockets. The socket API allows you to communicate using TCP. From a programmers POV, socket programming IS TCP



Just for completion only. The other protocol that sockets supports is UDP. See the DatagramSocket class for sending/reveiving UDP on a unicast address, and MulticastSocket for sending/receiving on a multicast group.

Henry
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic