hi i am new to TCP listening application under c# i manage to make the server listen to a specific port but when the server is about to read the stream it throws NullReferenceException
in this code
TcpClient tcpClient = (TcpClient)client;
NetworkStream clientStream = tcpClient.GetStream();
when i run the application all is fine until the server starts to read data
i tried using this code
TcpClient tcpClient = (TcpClient)client;
NetworkStream clientStream;
clientStream = tcpClient.GetStream();
but the error is the same
any help will do
thank you