[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[ns] Notify and wait wrt TCP Agents




Good evening all,

The application I am writing requires a knowledge of how many packets a
loss monitor agent has received. If X packets are received, the
application changes its behavior and spawns new agents. Right now, I am
*polling* all my LossMonitors at specific time intervals to find the
amount of packets received. I'm not happy doing this, but I know no other
way...

Are there any wait or notify commands I can use in TCL? In C++? Ideally I
want to have a thread that spawns my agent, have it send data, 
sleep until the LossMonitor gets the appropiate [$sink set bytes_], then
wake it up, spawn more threads, and kill it.

Is this possible/reasonable? Does anyone have any code to illustrate a
similar technique?

Thanks!

-Stan