16.05.2015 Views

Working with the Unix OS

Working with the Unix OS

Working with the Unix OS

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Processes II<br />

/* client loop */<br />

mesgptr->mesg_flag = 1; /* signal server */<br />

while (mesgptr->mesg_flag == 1)<br />

; /* wait for server to process */<br />

! Multiple Buffers<br />

/* typical program loop */<br />

while ( (n = read(fdin, buff, BUFFSIZE» > 0) /* process <strong>the</strong> data */<br />

write (fdout, buff, n);<br />

Sockets and TLI<br />

Sockets are a form of IPC provided by BSD4.3<br />

TLI, Transport Layer Interface is a form of IPC provided by System V.<br />

Both provide communication between processes on <strong>the</strong> same system and between processes on different systems.<br />

142

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!