Changes between Version 9 and Version 10 of Old/NodeHandler/Broadcast
- Timestamp:
- Apr 10, 2006, 10:10:26 PM (19 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Old/NodeHandler/Broadcast
v9 v10 132 132 Setup ACK list 133 133 WHILE (ACK_LIST_INCOMPLETE) 134 IF (TIMEOUT) 135 send(pipe) "TIMEOUT" to NodeHandler 136 break 137 END IF 134 138 sendto(BROADCAST_ADDR, message) /* send/resend the message */ 135 139 sleep(50ms) … … 137 141 END FUNCTION 138 142 139 2. ''Receiving Thread''140 ================ ===143 2. Receiving Thread 144 ================ 141 145 create a new TCP connection 142 146 bind … … 162 166 '''NodeAgent Communication Server''' 163 167 168 Following is the pseudo-code for this process functionality: 164 169 {{{ 170 1. 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 165 182 183 2. 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 166 191 }}} 167 192