473,398 Members | 2,404 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,398 software developers and data experts.

CallBack and Event problem

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
3 1348
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
* "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
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

8
by: Ash | last post by:
Hello all, I am hoping this is the appropriate newsgroup for a C++ interface design question. I am trying to design an interface for a subscriber to register/deregister handlers for various...
3
by: David | last post by:
Hi, Ive been trying to work this out for the past 2 days now and im not getting anywhere fast. The problem i have is that i am using Asynchronous sockets to create a Socket Client library....
2
by: Stampede | last post by:
Hi guys 'n' girls, I want to use callback methods when using BeginInvoke on some events. So far no problem, but know I thought about what could happen (if I'm not completly wrong). Lets say an...
2
by: Marten Van Keer | last post by:
Hi; I have two applications A and B *** Application B listens on a network stream with a callback function:
2
by: Gerda | last post by:
Hi! I've implemented many times an asynchronous call of a method with a call backfunction successfully. But to implement this with VB.NET is not so successfully. I can implement all events...
1
by: Timbo | last post by:
Hi all, This is my first message here so i'll try and include all the information that will help you help me out, if possible. Basically I am using C# in ASP.NET 2.0 and have a Repeater...
2
by: Nathan Sokalski | last post by:
I have a DataList in which the ItemTemplate contains two Button controls that use EventBubbling. When I click either of them I receive the following error: Server Error in '/' Application....
11
by: The Frog | last post by:
Hi all, Maybe I am just missing something simple here, but I seem to have an issue with a callback function in A97 that is used to fill a Listbox with values. The first time the callback...
0
by: Tim Spens | last post by:
--- On Fri, 6/27/08, Tim Spens <t_spens@yahoo.comwrote: I think I know where the problem is but I'm unsure how to fix it. When I call Register_Handler(...) from python via...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.