public void run(){
	System.out.println("ServerThread start");
        try{
            mainSocket=sock.accept();
            sock.close();
            if(listener!=null){
                listener.serverConnection();
            }
            new MainThread(mainSocket, password).start();

        }
        catch(Exception e){
            System.err.println("Listening for connection fail!" + e);
        }
    }