package WifiServer;

import Interfaz.*;
import java.net.ServerSocket;
import java.net.Socket;

/**
 *
 * @author jose
 */
public class ConectionManager extends Thread {
    MainPanelWifi mpw;

    public ConectionManager(MainPanelWifi mpw){
        this.mpw=mpw;
    }
    @Override
    public void start(){

      try
      {
         int i = 1;
         ServerSocket s = new ServerSocket(12345);

         for (;;)
         {
            Socket incoming = s.accept();            
            Thread t = new ServeClient(incoming,mpw);
            t.start();
            i++;
         }
      }
      catch (Exception e)
      {
         e.printStackTrace();
      }
    }
}
