is there a way that if there is not data coming in that we could do an event as appose to going to sleep
It's possible but I think it's a workaround.
Make a timer with timeout and reset it after any data send, with .tim=x (x is the timeout).
As mav said.
that's no workaround, that's a valid coding technique ...