[Click] wait() in click

ﻯﻮﻠﻫﺩ ﺮﻤﻋ omerbeg at gmail.com
Thu Nov 23 09:33:54 EST 2006


Hi

I am trying to create an element that has to wait for a response from a
remote host, something like an arp. Instead of giving a long description of
the problem I can summarize the flow as being the following:

------------------------------------
1. p_i = packet of type 'i' enters the element
2. process_packet(p_i);
3. p_a = new packet of type 'a' created
4. output(n).push(p_a); //pushed to another element -> eventually to the NIC
5. wait(ms); // wait until a response to p_a arrives from destination
6. process_packet(p_i);
7. output(m).push(p_i);
-------------------------------------

My question is: can I do it in a single thread ? or will I need a separate
thread to implement 3 and 4 ? and how can I create these threads ?

Sincerely

-Omer


More information about the click mailing list