Sockets Tutorial PDF file
Sockets Tutorial PDF file Sockets Tutorial PDF file
The Berkeley API An application program interface(API) allows Application programs to access certain resources through a predefined and preferably consistent interface. The socket interface is now available on many UNIX machines. Another popular socket interface that was derived from BK-socket is called the Windows Socket or Winsock. The socket mechanism allows programmers to write appl programs easily without worrying about the underlying networking details. In a typical communication session one application operates as a server and the other application acts as the client. The server provides services upon request from the client. Two modes of service : Connection-oriented ,Connectionless Connection-oriented : Reliable ,setup overhead Connectionless : Unreliable, “Best –Effort” Service, No setup overhead
server Socket() “socket calls for connection-oriented com” ------------------------------------------------- Bind() Listen() Accept() Blocks :req->client Read() Write() Close() data client Socket() Connect() Write() Read() Close()
- Page 1: The Berkely API (Application Protoc
- Page 5 and 6: Appl 1 Appl 2 socket socket Underly
- Page 7 and 8: SOCKET CALLS FOR CONNECTIONLESS COM
- Page 9 and 10: SOCKET SYSTEMS CALLS( contd…..) i
- Page 11 and 12: MORE SOCKET CALLS ..!! Client estab
- Page 13 and 14: SYS CALLS FOR DATA TRANSFER ..!! Cl
- Page 15 and 16: IP ADDRESS MANIPULATION FUNCTIONS F
- Page 17 and 18: * Code to handle connection req fro
- Page 19 and 20: * Input from the user .. gets(sbuf)
- Page 21 and 22: Here is a list of links to Sockets
The Berkeley API<br />
An application program interface(API) allows Application programs to<br />
access certain resources through a predefined and preferably consistent<br />
interface.<br />
The socket interface is now available on many UNIX machines.<br />
Another popular socket interface that was derived from BK-socket is<br />
called the Windows Socket or Winsock.<br />
The socket mechanism allows programmers to write appl programs<br />
easily without worrying about the underlying networking details.<br />
In a typical communication session one application operates as a server<br />
and the other application acts as the client. The server provides services<br />
upon request from the client.<br />
Two modes of service : Connection-oriented ,Connectionless<br />
Connection-oriented : Reliable ,setup overhead<br />
Connectionless : Unreliable, “Best –Effort” Service, No setup overhead