In this lecture we are discussing about-
What is Socket?
Socket Programming
Client Side Programming
Server Side Programming
Socket- A socket is one endpoint of a two-way communication link between two programs running on the network.
Socket Programming- Socket programming is a way of connecting two nodes on a network to communicate with each other. One socket (node) listens on a particular port at an IP, while other socket reaches out to the other in order to form a connection.
End Point = IP Address + Port Number
Client Side-
Connection Establishment:
Socket sock=new Socket(“192.168.0.1”,4500);
Communication
Close the Connection
Server Side-
Required two sockets-
ServerSocket
Socket
Communication
Connection Close