1.

What is Socket Programming? What Are The Benefits And Drawbacks Of Java Sockets?

Answer»

Socket programming is a method of allowing two network nodes to communicate with each other. One socket (node) LISTENS on a SPECIFIC port at an IP address, while the other socket connects with it. While the client connects to the server, the server creates the listener socket.

Java Socket Benefits:

  • Sockets are adaptable and adequate. For general communications, efficient socket-based programming is simple to build.
  • Low network TRAFFIC is caused by sockets. Unlike HTML forms and CGI scripts, which construct and send entire web pages for each new request, Java applets can simply send the information that has changed.

Java Socket Drawbacks:

  • Because a Java applet running in a Web browser can only connect to the machine from which it originated and nowhere else on the network, security restrictions can be OPPRESSIVE at times.
  • Despite all of Java's beneficial capabilities, Socket-based CONNECTIONS merely allow for the transmission of raw data packets between programs. Both the client and the server must provide ways for making the data valuable in some way.
  • Because data formats and protocols are application-specific, the re-use of socket-based systems is limited.


Discussion

No Comment Found