C
C#13mo ago
Mango

socket message queue questions

As I impl my own MQ, taking in everyone who has showed me example and such, I notice Channel<T> doesn't have a subscribe system like I thought it would (example from Akari used them). You have to constantly read on the Reader. I add a serialized packet to a collection to be handled for further processing to properly sort it. I think from research what I want is an ObservableCollection ?
1 Reply
Mango
Mango13mo ago
My read method which constantly reads for new messages from the socket, when it gets a full one it will add a serialized model from the data to a collection. I then want a subscriber to go off the collection is updated and sort the packet into proper outlets I know Observable is the area I want to be in. But there are a lot of things here. Looks like I want ObservableCollection, but is there a reason to use Channel<T> and have a thread reading the reader instead constantly over an ObservableCollection ?