Rockwell Automation 1771-DMC_DMC1_DMC4_DXPS Control Coprocessor User Manual User Manual

Page 101

Advertising
background image

Chapter 6

Using the Ethernet Interface

6-20

Analogy to Client/Server Application

A simple analogy to the client/server application is the
time-and-temperature service that is provided by the local telephone
company. To acquire the time and temperature, you:

look

up

time

and

temperature

in the telephone directory

dial the number
receive an announcement of the time and local temperature
hang up the telephone

The following flow chart shows a client/server analogy to the
time-and-temperature operation.

Purchase Phone Service

socket ( )

Look up phone number

gethostbyname ( )

Look up the extension

getservname ( )

Dial phone number and extension

connect ( )

Listen to the announcement

recv ( )

DoneĊhangup

shutdown ( )

close ( )

Client

Purchase Phone Service

socket ( )

Put phone number in book

bind ( )

Buy equipment to announce time

and temp, connect it, set to auto

answer number

listen ( )

If not busy announcing,

answer phone

accept ( )

Announce time

send ( )

DoneĊhangup

shutdown ( )

close ( )

Server

Wait for next call

Advertising