CallBack and Event problem

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
 
E

EricJ

just a thought
are you sure the callback function is finished ? maybe placing the callback
in another tread could help.
 
H

Herfried K. Wagner [MVP]

* "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'?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top