I want to read data from network stream in csharp.
I have a list of clients that I poll regularly but when I start reading data from one client, I have to read the whole xml message and then continue to the next client. If there is some delay in receiving data I should not go to the next client. I should wait for some time and get the data. Also, I shouldnt be waiting indefintely. Just time out and continue to next client after x seconds....
if(s.Available > 0) { //read data till i get the whole message. //timeout and continue with other clients if I dont recieve the whole message //within x seconds. }
Is there good support from csharp language to do this elegantly....
Any help is appreciated. Thanks!!!