Hi,
I am working on a socket programming code and I need to modify part of it. In the code there is a line where a process receives a message :
receive(source, buf);
When a process receives a message, I don't want to deliver the message immediately, what I want is to deliver it at sometime later (with some delay).
do you know how I can do it? I tried the sleep() but it is not what I want, since when the process is asleep,it does not receive next messages until sleep time is elapsed. I think I should use timers, like start a timer when a message is received, and after the timer is expired I deliver the message, and I need to start a timer for each message. I don't know how to do this and which timers I should use. I f anybody can explain this to me, it will be a great help!
thanks a lot!
Ghazale
I am working on a socket programming code and I need to modify part of it. In the code there is a line where a process receives a message :
receive(source, buf);
When a process receives a message, I don't want to deliver the message immediately, what I want is to deliver it at sometime later (with some delay).
do you know how I can do it? I tried the sleep() but it is not what I want, since when the process is asleep,it does not receive next messages until sleep time is elapsed. I think I should use timers, like start a timer when a message is received, and after the timer is expired I deliver the message, and I need to start a timer for each message. I don't know how to do this and which timers I should use. I f anybody can explain this to me, it will be a great help!
thanks a lot!
Ghazale