Link to home
Start Free TrialLog in
Avatar of Frosty555
Frosty555Flag for Canada

asked on

Making a "QueueStream" class VB.NET

I'm trying to make a new stream class called QueueStream that is effectively a "first in first out" queue. I'd like it to be setup so that "writing" to the stream is like queuing, and "reading" from the stream is like dequeuing.

I've made the shell for the stream class, but I don't know how to implement the internal way of holding the data being written and read. A byte array seems clumsy - sure I can write to it by resizing the array, but when a "read" from the stream I have to somehow "pop" the data off the front of the array, and reshuffling the entire contents around in memory to resize the array seems like a slow way of doing it.

Any ideas?
ASKER CERTIFIED SOLUTION
Avatar of Frosty555
Frosty555
Flag of Canada image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial