Mercurial > hg > Database > Christie-sharp
diff daemon/AcceptThread.cs @ 34:1236da135f79
update
author | riono <e165729@ie.u-ryukyu.ac.jp> |
---|---|
date | Tue, 27 Apr 2021 22:57:14 +0900 |
parents | 7575980bffc9 |
children | 98ee1ee1efb7 |
line wrap: on
line diff
--- a/daemon/AcceptThread.cs Tue Apr 20 18:42:17 2021 +0900 +++ b/daemon/AcceptThread.cs Tue Apr 27 22:57:14 2021 +0900 @@ -16,7 +16,7 @@ } public void Run() { - //while (true) { + while (true) { try { TcpClient client = null; client = listener.AcceptTcpClient(); @@ -28,7 +28,6 @@ Console.WriteLine("Accept " + hostEntry.HostName + ":" + endPoint.Port); Connection connection = new Connection(client.Client, cgm); - Console.WriteLine("connect@" + connection.GetInfoString()); string key = "accept" + counter; IncomingTcpConnection incoming = new IncomingTcpConnection(connection); @@ -37,7 +36,7 @@ incomingThread.Start(); cgm.SetAccept(key, incoming); - + OutboundTcpConnection outbound = new OutboundTcpConnection(connection); Thread outboundThread = new Thread(outbound.Run); outboundThread.Name = connection.GetInfoString() + "-OutboundTcp"; @@ -46,7 +45,7 @@ } catch (Exception e) { Console.WriteLine(e.StackTrace); } - //} + } } } } \ No newline at end of file