예제 #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);
     }
 }