Sockets: It is the name given, in one particular programming model, to the endpoints of a communication link between processes. It was the popularity of that particular programming model,the term socket has been reused in other programming models,including Java technology.
When the processes commmunicate over anetwork,Java technology uses the streams model. A socket can hold two streams : 1 input stream and 1 output stream. A process reads data witten by another process by reading from the input stream associated with that socket. After the setup of network connection is accomplished , using the streams associated with that connection is similar to using any other stream.Setting Up the Connection:
The layout is such that , one machine must run a program that is waiting for a connection, and a second machine must try to reach the first. This is just like a telephone system ,in which one person makes a call, while the other one is waiting by the telephone when that call is made.
">Concept of Netwoking by using Java Technology:>Connection Addressing:
">When we make a telephone call, we need the "TELEPHONE NUMBER" to be dialed. When we make a network, we need the "address" or the "name" of the remote machine. In addition,a network connection requires a port number,which is just like a telephone extension number. After we connect to the proper computer, we must identify a particular purpose for the connection. So, we can use a particular port number to communiucate with the accounting program.
No comments:
Post a Comment