23.03.2017 Views

wilamowski-b-m-irwin-j-d-industrial-communication-systems-2011

Create successful ePaper yourself

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

61-14 Industrial Communication Systems<br />

61.3 State Diagram<br />

The state transition diagram for software that implements TCP is presented. Figure 61.11 shows the state<br />

transition diagram for the server and for the client. The dashed lines indicate transitions in a server.<br />

The solid lines indicate transitions in a client.<br />

61.4 Programming Samples<br />

Figures 61.12 and 61.13 contain two C programs that demonstrate the use of TCP for <strong>communication</strong><br />

using client–server paradigm [C02-3]. Socket API is a de facto standard. Programs use conditional<br />

compilation directives that include minor variations in the library headers needed for operation under<br />

(a)<br />

FIGURE 61.12<br />

Sample C program that illustrates a TCP server (a), (b).<br />

© <strong>2011</strong> by Taylor and Francis Group, LLC

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

Saved successfully!

Ooh no, something went wrong!