高手近来看看!在线等!
private void thStart(object obj)
{
Console.WriteLine( "建立分支点对点连接... ");
NetworkStream NS = (NetworkStream)obj;
SR = new StreamReader(NS);
SW = new StreamWriter(NS);
while (true)
{
if (NS.DataAvailable)
{
Console.WriteLine( "开始接受客户端命令... ");
byte[] stream = new byte[256];
NS.Read(stream, 0, stream.Length);
Console.WriteLine(System.Text.Encoding.UTF8.GetString(stream));
SW.WriteLine( "登陆成功拉 ");
SW.Flush();
string order = SR.ReadLine();
Console.WriteLine( "命令:{0} ", order);
string[] spliter = order.Split( ', ');
switch (spliter[0])
{
//用户登录
case "Login ":
Console.WriteLine( "用户试图登陆 ");