Example #1
0
 private static void RunTheServer()
 {
     try
     {
         TcpListener listener = new TcpListener(IPAddress.Loopback, PORT);
         listener.Start();
         logger.LogOtherMessage("Waiting for incoming connections...");
         while (true)
         {
             TcpClient tcpClient = listener.AcceptTcpClient();
             new Thread(new TraderHandler(tcpClient, theMarket, logger).RunThread).Start();
         }
     } catch (Exception e)
     {
         logger.LogError(e.ToString());
     }
 }