简体   繁体   中英

Inter process data handling between tcp client thread to active forms

I have tcp client socket thread which receives data update frequently. what is the best way to store the data and send appropriate data to active forms.

TCP client thread can extract data from TCP socket and do one of the following. Data can be deserialized before passing to active form.

1.Put data(object) in shared data structure like list, queue or stack and raise a event on active form.

2.Put data(object) in shared data structure like list, active form has already subscribed to collection changed event of data structure.

3.Directly raise an event on active form with passing received data(object) as event parameter

~Nilesh

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM