Specifications

SLAA137A
20 MSP430 Internet Connectivity
Very important for the proper function of the stack is the periodic calling of the function
DoNetworkStuff() by the application. A typical program flow chart using this TCP/IP API is shown
in Figure 9.
DoNetworkStuff()
Open or Close Connection
Process Incoming or Outgoing Data
Termination of Program Requested?
Yes
No
Misc Program
Misc Program
Figure 9. Using DoNetworkStuff()
The blocks containing misc program must not contain code which could block the periodic
execution of DoNetworkStuff() (for example endless waiting or polling for an event). The
software should use the help of timers and counters to avoid blocking. An example for this
programming style is the HTTP server that is explained in Section 4.4.