Java Design Pattern
Introduction to Java 10
Introduction to Java 11
Introduction to Java 12

Java Sockets

  • It is a logical connecting point between a server and a client on a network.
  • Each socket is given an identification number called port number.
  • Port number takes 2 bytes and can be from 0 to 65,535.
  • To establish a communication between a server and a client is called as Socket programming.
  • We will use a new port number for each new socket.
  • That means every new service on the net should be assigned a new port number.

The following table represents some port numbers which are already used by applications running in our system.

Fig :

  • • When a socket at server side is called server socket which is created using ServerSocket class.
  • • Similarly a socket at client side is called as Socket which is created using Socket class.
  • • Both ServerSocket and Socket class are available in package.

About the Author

Silan Software is one of the India's leading provider of offline & online training for Java, Python, AI (Machine Learning, Deep Learning), Data Science, Software Development & many more emerging Technologies.

We provide Academic Training || Industrial Training || Corporate Training || Internship || Java || Python || AI using Python || Data Science etc