471,627 Members | 1,571 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

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

Meesage Queue

Hi,

I have a desktop application that i would like to design a message handler
into.

Data comes into the app over ethernet which i obtain through a TCP Server on
my PC. I want to take each packet of data and buffer it in a message queue.
Another thread in my app will take each message off of the queue and send it
to appropriate place for processing.

All of this takes place on the same PC.

Now I thought of using the .NET MessageQueue but from first impressions this
seems overkill and seems to emphasise using queue for inter process comms
between 2 or more PC's.

I want to use a "queue" as a means of buffering data between two thread on
the same app on the same PC.

I'd appreciate any advice on this,

Regards
Macca
Jan 18 '06 #1
2 1096
Hi,

Data comes into the app over ethernet which i obtain through a TCP Server
on
my PC. I want to take each packet of data and buffer it in a message
queue.
Another thread in my app will take each message off of the queue and send
it
to appropriate place for processing.


Not clear what you mean here, are you saying that you have two applications,
one that is the receiving end of a tcp connection and then the new one taht
you want to create that "sniff" the packages from the first one and do
something with them?
If this is so I thnk you are out of luck , the framework does not support
this, at least I haven't seen it yet.

If you have one app that listen to the network connection & do the
processing the thing changes, what you could do is have two threads , one
waiting to process the message and the other taking care of the network
receiving, a tipical producer-consumer escenario . take a look at
www.yoda.arachsys.com/csharp I think there is an example there of how to do
it

--
Ignacio Machin,
ignacio.machin AT dot.state.fl.us
Florida Department Of Transportation
Jan 18 '06 #2
You should consider using the System.Collections.Queue class for this.
Peter

--
Co-founder, Eggheadcafe.com developer portal:
http://www.eggheadcafe.com
UnBlog:
http://petesbloggerama.blogspot.com


"Macca" wrote:
Hi,

I have a desktop application that i would like to design a message handler
into.

Data comes into the app over ethernet which i obtain through a TCP Server on
my PC. I want to take each packet of data and buffer it in a message queue.
Another thread in my app will take each message off of the queue and send it
to appropriate place for processing.

All of this takes place on the same PC.

Now I thought of using the .NET MessageQueue but from first impressions this
seems overkill and seems to emphasise using queue for inter process comms
between 2 or more PC's.

I want to use a "queue" as a means of buffering data between two thread on
the same app on the same PC.

I'd appreciate any advice on this,

Regards
Macca

Jan 18 '06 #3

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

9 posts views Thread by Brian Henry | last post: by
2 posts views Thread by lavender | last post: by
3 posts views Thread by jrpfinch | last post: by
4 posts views Thread by j_depp_99 | last post: by
reply views Thread by ecestd | last post: by
1 post views Thread by XIAOLAOHU | last post: by
reply views Thread by leo001 | last post: by

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.