示例#1
0
 public GwentClient(TcpClient NewClient, GwentServer server)
 {
     this.Id           = Guid.NewGuid().ToString();
     this.GwentServer  = server;
     this.Client       = NewClient;
     this.ClientStream = NewClient.GetStream();
     this.Health       = 2;
     this.Scope        = 0;
 }
示例#2
0
 public void Dispose()
 {
     if (ClientStream != null)
     {
         ClientStream.Close();
     }
     if (Client != null)
     {
         Client.Close();
         GwentServer = null;
     }
 }
示例#3
0
文件: MainPr.cs 项目: Lolik21/DevSoft
 static void Main(string[] args)
 {
     try
     {
         GwentServer server       = new GwentServer();
         Thread      ServerThread = new Thread(new ThreadStart(server.WaitForConnection));
         ServerThread.Start();
     }
     catch (Exception ex)
     {
         Console.WriteLine(ex.Message);
     }
 }