Socket programming and networking examples in Java.
Communication mechanism is provided by the sockets b/w 2 computers by the help of TCP. Client program makes socket to make it connected to the server.
After the connection has been created, a socket object is created by the server at its communication end. Server & client then can communication by reading from or writing to the socket.
Socket is represented by the java.net.Socket & mechanism is provided by the java.net.ServerSocket for server program so that
Networking programming means to write those programs which could be executed across various devices, where devices are connected via a network.
J2SE APIs has java.net package which consist of interfaces and classes collection which give communication details of low level, that allow to write the programs which keeps its focus to sort out the problems.
For 2 network protocols, support is provided by the java.net package: TCP: Transmission Control Protocol