public void start() throws Exception {
        
        ServerSocket ss = null;
        try {
            ss = new ServerSocket(serverPort);
            ss.setSoTimeout(DEFAULT_TIMEOUT);
        } catch(IOException e) {
            throw new Exception("Can't create socket for server.");
        }
        
        System.out.println("Server started.");
        
        try {
            
            while(System.in.available() == 0) {
                
                Socket cs = null;
                
                try {
                    cs = ss.accept();
                } catch (SocketTimeoutException e) {
                    continue;
                }
                
                tController.subscribe(cs);                
                
            }
            
        } catch(IOException e) {
            e.printStackTrace();
        }
        
        tController.unsubscribeAll();
        
    }