Hi,im trying to implement unblocking reading from network stream, this causes me headaches:
StreamReader sr = new StreamReader(layer);
ret = sr.Read(buffer, 0, 1024);
Reads first 47 chars from network stream, it is end of line.
Next attempt will end in indefinite block.
Any attempt of:
sr.Peek(); - block too
sr.EndOfStream == true; - block too
Any attempt of reading, checking status from network stream causes freeze.
What to do ? Thanks.
StreamReader sr = new StreamReader(layer);
ret = sr.Read(buffer, 0, 1024);
Reads first 47 chars from network stream, it is end of line.
Next attempt will end in indefinite block.
Any attempt of:
sr.Peek(); - block too
sr.EndOfStream == true; - block too
Any attempt of reading, checking status from network stream causes freeze.
What to do ? Thanks.