You are on page 1of 1

At the very starting of the manual, consider a typical scenario where you want to get some information from

an information center located in your area or out of your district. May be you want to send information to your friends. The information center has a path by which someone enter into the center. It also waits for request from someone who wants to know information or send information to others. Before waiting for requests, the information center creates and opens the path for the people. If anyone wants to knock the information center for information s/he has to know the address of the information center. When someone requests for information the information center the information center sends to information to the client using her address. To perform all these work both the information center and the client perform some flow of work. The socket programming is mostly as same as this scenario. We will see those functions according the concept of network socket programming. Lets start with the concept of socket programming.

What is Socket? Sockets allow communication between two different processes on the same or different machines. To be more precise, it's a way to talk to other computers using standard Unix file descriptors. In Unix, every I/O actions are done by writing or reading to a file descriptor. A file descriptor is just an integer associated with an open file and it can be a network connection, a text file, a terminal, or something else. To a programmer a socket looks and behaves much like a low level file descriptor. This is because commands such as read () and write () work with sockets in the same way they do with files and pipes. The differences between sockets and normal file descriptors occur in the creation of a socket and through a variety of special operations to control a socket. Server-Client model is one of the examples of interprocess communication. We will show the sequential steps of implementing server-client model as an example of socket programming.

You might also like