By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
459,701 Members | 1,711 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 459,701 IT Pros & Developers. It's quick & easy.

CallBack and Event problem

P: n/a
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
Nov 20 '05 #1
Share this Question
Share on Google+
3 Replies


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

"Marten Van Keer" <ma****@c3.be> wrote in message
news:3f*********************@reader3.news.skynet.b e...
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

Nov 20 '05 #2

P: n/a
* "Marten Van Keer" <ma****@c3.be> scripsit:
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'?

--
Herfried K. Wagner
MVP VB Classic, VB.NET
<http://www.mvps.org/dotnet>
Nov 20 '05 #3

P: n/a
Yes I am using the System.Windows.Form.Timer object

"Herfried K. Wagner [MVP]" <hi***************@gmx.at> wrote in message
news:bn*************@ID-208219.news.uni-berlin.de...
* "Marten Van Keer" <ma****@c3.be> scripsit:
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'?

--
Herfried K. Wagner
MVP VB Classic, VB.NET
<http://www.mvps.org/dotnet>

Nov 20 '05 #4

This discussion thread is closed

Replies have been disabled for this discussion.