Hi,
I am writing to a network stream using the following code:
TcpClient client = new TcpClient();
client.Connect(IPAddress.Parse("192.168.2.100"), 55650);
NetworkStream stream = client.GetStream();
StreamWriter writer = new StreamWriter(stream);
writer.Write("TEST");
writer.Flush();
Now, I am reading from the network stream using the following code:
NetworkStream netStrm = new NetworkStream(socket);
StreamReader reader = new StreamReader(netStrm);
string str = reader.ReadToEnd();
The method ReadToEnd(), is blocking the client application is
terminated. I also tried to client.Close(), but still method blocks.
Is there a way to read all data sent without terminating the client.
Can someone help me out
Thanks in Advance