Code example for ServerSocket

Methods: close

0
        mThread = new Thread(this, "Local View Server [port=" + mPort + "]");
        mThreadPool = Executors.newFixedThreadPool(VIEW_SERVER_MAX_CONNECTIONS);
        mThread.start();
 
        return true; 
    } 
 
    /** 
     * Stops the server. 
     * 
     * @return True if the server was stopped, false if an error occurred or if the 
     *         server wasn't started. 
     * 
     * @see #start() 
     * @see #isRunning() 
     * @see WindowManagerService#stopViewServer() 
     */ 
    public boolean stop() { 
        if (mThread != null) {
            mThread.interrupt();
            if (mThreadPool != null) {