473,396 Members | 1,891 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,396 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 1166
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

9
by: Brian Henry | last post by:
If i inherite a queue class into my class, and do an override of the enqueue member, how would i then go about actually doing an enqueue of an item? I am a little confused on this one... does over...
3
by: Kceiw | last post by:
Dear all, When I use #include "queue.h", I can't link it. The error message follows: Linking... G:\Projects\Datastructure\Queue\Debug\main.o(.text+0x136): In function `main':...
2
by: lavender | last post by:
When define a maxQueue is 10, means it able to store 10 items in circular queue,but when I key in the 10 items, it show "Queue Full" in items number 10. Where is the wrong in my code? Why it cannot...
3
by: jrpfinch | last post by:
I have a script which is based on the following code. Unfortunately, it only works on Python 2.3 and not 2.5 because there is no esema or fsema attribute in the 2.5 Queue. I am hunting through...
4
by: j_depp_99 | last post by:
Thanks to those guys who helped me out yesterday. I have one more problem; my print function for the queue program doesnt work and goes into an endless loop. Also I am unable to calculate the...
0
by: javajaunit | last post by:
HI, I have a requirement that to place a message from folder to MQ QUEUE. Messages are stored in a ".dat" file. I am reading this file(it contains xml data) from folder and converting this file...
2
by: jrumanek | last post by:
Hallo, I have problem with function WaveInOpen . This function doesn't return meesage MM_WIM_OPEN? Shall YOU help me pleas? Any suggestions? Thank you!
2
by: ecestd | last post by:
how do you implement a copy constructor for this pointer-based ADT queue #include <cassert // for assert #include <new // for bad_alloc using namespace std; //private:{Queue::Queue(const...
0
by: ecestd | last post by:
I did implement the copy constructor but still have a problem with it. It is not working. What could be wrong? #include "QueueP.h" #include <cassert // for assert #include <new // for...
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: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
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
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
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...

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.