when i am listening on any port

using TcpClient bufferedstream available method ,
No reponse comes .Program hangs there or u can say does
not come out of the read method

tc is TcpClient
ns is networkstream

ns = tc.getStream();
while( ns.DataAvailable )
{

try
{

rec=bs.ReadByte();
Console.Write(rec);
Console.Write("\n");
}catch(System.IO.EndOfStreamException)
{
Console.WriteLine("EndOfStreamException Received ");
}

}


Can anyone help me that in which way i can read socket
correctly..