Technical Paper on Socket Programming in JAVA

For using internet facilities we must have connection between application program and protocol software. UNIIX is a process oriented operating system in which each program executes at a user level. In it the application programs will going to interact with operating system by making system calls. It takes arguments and return results. In it, it gives system calls to open and read data or transfer data. Both read and write takes three argument that specify the discription to use, the address of the buffer and the number of bytes to transfer. It has an early implementation of TCP/IP protocols. We can send data through socket and again receive it. We can specify the local address to the socket.

Sockets: – The end point of communication is called as socket. IP address and port number both together makes a socket. They are also called as client server architecture. To make a connection to the internet socket send a request to the sever.

Socket Abstraction: – In UNIX the program request the operating system to create socket when needed. By using the socket the application sends the address to the destination.

Creating a socket: – The sockets are created by the system call on demand for this it take three integer arguments and returns the result in integer. And the arguments specify the type of communication.

Socket inheritance and termination:-UNIX uses two ways to start the application. First is fork, it creates the copy of running application and second is exec, in this the new copy replaces itself. When a program all, then the new copy inherits access to open all socket.

Conclusion:-The exact interface between application and software depends on the details of the operating system. For using TCP/IP we must create socket and bind address to it than accept incoming connection and communicate using read and write primitives.

Download  Technical Paper on Socket Programming in JAVA .

Leave a Reply

Your email address will not be published. Required fields are marked *