Saturday 5 January 2019

What is Java Socket Programming? tccicomputercoaching.com

The java.net.Socket class represents a socket, and the java.net.ServerSocket class provides a mechanism for the server program to listen for clients and establish connections with them.

Java Socket programming is used for communication between the applications running on different JRE.



Java Socket programming can be connection-oriented or connection-less.

Socket and ServerSocket classes are used for connection-oriented socket programming and DatagramSocket and DatagramPacket classes are used for connection-less socket programming.

Clientside Programming:

The client in socket programming must know two information:
  1. IP Address of Server, and
  2. Port number.
A socket is simply an endpoint for communications between the machines. The Socket class can be used to create a socket.

public InputStream getInputStream() , public OutputStream getOutputStream(),public synchronized void close() are important methods in clientside programming.

Serverside Programming:

public Socket accept(),2) public synchronized void close() are important methods in serverside Programming.

The ServerSocket class can be used to create a server socket. This object is used to establish communication with the clients.

TCCI conduct various types of courses like Basic Computer Course, Programmming Course, Web Designing Course, Project Training Course, Web Developmnet Course, Typing, SEO, Coaching for All Engineering Branch , Maths Coaching , School Computer Course Coaching etc.

You can join course as per your requirements at Bopal or Satellite in Ahmedabad.

For more information about TCCI.

Call us @ 9825618292

Visit us@ http://tccicomputercoaching.com/course/

No comments:

Post a Comment