CallBack and Event problem

  • Thread starter Thread starter Marten Van Keer
  • Start date Start date
M

Marten Van Keer

Hello;

I have an application that waits for TCP packets to arrive on a network
stream. A callback function(using an asynccallback delegate) is implemented
to tell the application some packets have arrived.

At the same time the application uses the Timer object. The Tick-event of
this timer is set to 50 seconds.

The problem is when the callback function is triggered the timer tick-event
doesn't "tick" anymore. It looks like the timer event is being disabled
after the callback did his thing.

Any Idea Why ?

Thanks in advance
 
just a thought
are you sure the callback function is finished ? maybe placing the callback
in another tread could help.
 
* "Marten Van Keer said:
I have an application that waits for TCP packets to arrive on a network
stream. A callback function(using an asynccallback delegate) is implemented
to tell the application some packets have arrived.

At the same time the application uses the Timer object. The Tick-event of
this timer is set to 50 seconds.

The problem is when the callback function is triggered the timer tick-event
doesn't "tick" anymore. It looks like the timer event is being disabled
after the callback did his thing.

Are you using 'System.Windows.Forms.Timer'?
 
Back
Top