I am looking into stream reader timeout property. From the documentation, I did not understand,
- How this property works?
- What will happen when stream reader timeouts?
Can somebody explain me these questions or point out to some better documentation than this.
https://msdn.microsoft.com/en-us/library/system.io.stream.readtimeout(v=vs.110).aspx
Sample code:
TcpClient client = new TcpClient(serverIP, serverTcpPort);
Stream s = client.GetStream();
StreamReader sr = new StreamReader(s);
sr.BaseStream.ReadTimeout = 100;