Changes between Version 9 and Version 10 of Old/NodeHandler/Broadcast


Ignore:
Timestamp:
Apr 10, 2006, 10:10:26 PM (19 years ago)
Author:
sswami
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Old/NodeHandler/Broadcast

    v9 v10  
    132132       Setup ACK list
    133133       WHILE (ACK_LIST_INCOMPLETE)
     134         IF (TIMEOUT)
     135           send(pipe) "TIMEOUT" to NodeHandler
     136           break
     137         END IF
    134138         sendto(BROADCAST_ADDR, message)  /* send/resend the message */
    135139         sleep(50ms)
     
    137141    END FUNCTION
    138142 
    139 2. ''Receiving Thread''
    140    ===================
     1432. Receiving Thread
     144   ================
    141145   create a new TCP connection
    142146   bind
     
    162166'''NodeAgent Communication Server'''
    163167
     168Following is the pseudo-code for this process functionality:
    164169{{{
     1701. MAIN THREAD
     171   ===========
     172   create the new Broadcast Client socket 
     173   create the receiving thread            /* this thread will send TCP message */
     174    WHILE (true)
     175       message = recvfrom(socket)         /* receive message from NodeHandler*/
     176       IF (message for this NodeAgent)
     177          construct ACK message
     178          send(pipe) ACK message to receiving thread
     179          send(pipe) message to the NodeAgent
     180       END IF
     181    END WHILE
    165182
     1832. RECEIVING THREAD
     184   ================
     185   create a TCP connection
     186   WHILE (true)
     187       recv(pipe) message from the NodeAgent / Main Thread
     188       Send message to the NodeHandler COmmunication Server
     189   END WHILE
     190   
    166191}}}
    167192