Example #1
0
 public TalkServ() { 
     handles = new Hashtable(100); 
     handleByConnect = new Hashtable(100); 
     server = new System.Net.Sockets.TcpListener(4296); 
     while(true) { 
         server.Start(); 
         if(server.Pending()) { 
             N.Sockets.TcpClient connection = server.AcceptTcpClient(); 
             Console.WriteLine("Connection made"); 
             BackForth BF = new BackForth(connection);             
         } 
     } 
 } 
Example #2
0
 public TalkServ()
 {
     server = new System.Net.Sockets.TcpListener(85);
     Console.WriteLine("Started News Server.\nNews are:\n" + NEWS);
     while (true)
     {
         server.Start();
         if (server.Pending())
         {
             N.Sockets.TcpClient connection = server.AcceptTcpClient();
             Console.WriteLine("Connecting client!");
             BackForth BF = new BackForth(connection);
         }
     }
 }