For(;;)
{
   nBytes=-1;
   If(test) nBytes=getCmdLineCommand(cmd);
       // Manually sending commands from cmd line
   Else if(remote) nBytes=getRemoteCommand(cmd);  
       // Receiving commands over TCP/IP   
   If(nBytes0)    translateCmdToEventAndSen...(cmd)
   if(lostConnectionWithClien()) waitForClient()
      sleep(400);
}

Example 2: Pseudocode for the bridge program.

Back to Article