Hi,
I'm trying to replace what I would usually implement as a circular-buffer+. The function of the queue is to buffer incoming bytes (eg. from serial port or some other stream of data), whilst a parser examines bytes in the queue and detects and extracts message packets.
Criteria:
- can grow (ie not fixed-sized)
- >= 1 bytes can be enqueued at a time
- >= 1 bytes can be dequeued at a time
- efficient
I'm tempted just to use
System.Collections.Generic.Queue<byte>
... but I'm not sure if this is the most efficient type to use. Any suggestions?
Are there any smarter ways of doing what I'm trying to do? (Eg. Interesting suggestions here)
Thanks for your suggestions & input.
Prembo.