using System;
using System.Collections.Generic;
using System.Net.Sockets;
using System.Text;
public class Client
{
static public void Main( string[] Args )
{
TcpClient socketForServer = new TcpClient( "localHost", 65000 );
NetworkStream networkStream = socketForServer.GetStream();
System.IO.StreamReader streamReader = new System.IO.StreamReader( networkStream );
string outputString;
do{
outputString = streamReader.ReadLine();
if ( outputString != null )
{
Console.WriteLine( outputString );
}
}while ( outputString != null );
networkStream.Close();
}
}
|