In this paradigm two processes exchange informaon by

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: [1] create(tcp) os2 [7’’] p [6] create(tcp) os1 P1 [1’’] (s) [2] set(k) [2’] p [3] bind(h,p) [1’] [4] listen [5] accept s k a1 [6’’] (s’) [7’] p P2 [6’] s’ a2 [7] connect(h,p) Sockets 7           Sockets are a programming abstrac=on to implement low ­level (but, nevertheless, logical ­level) IPC. In this paradigm, two processes exchange informa=on by each one having a socket of its own, as an endpoint, and reading/wri=ng from/onto its socket. In Unix ­like systems, sockets are referenced by a descriptor, i.e., they can be viewed as I/O streams. Sockets are created and, in a client ­server approach, prepared (by a prescribed series of calls to Socket API opera=ons) for sending and receiving messages. Sending data then becomes wri=ng onto a socket and receiving data becomes reading from a socket. Client ­Side Sockets (1) 8     A client ­side so...
View Full Document

This document was uploaded on 02/10/2014.

Ask a homework question - tutors are online