Iris/src/main/java/TcpServer.java
public synchronized void start(){
        if( this.currentState == State.STOPPED ){           // Only if we're stopped now
            assert ioThread == null : ioThread;             // Shouldn't have a thread

            Runnable run = new Runnable() {
                @Override
                public void run() {
                    runServer();                            // This runs for a long time
                    ioThread = null;          
                    setState( State.STOPPED );              // Clear thread
                }   // end run
            };  // end runnable
            
            if( this.threadFactory != null ){               // User-specified threads
                this.ioThread = this.threadFactory.newThread(run);
                
            } else {                                        // Our own threads
                this.ioThread = new Thread( run, this.getClass().getName() );   // Named
            }

            setState( State.STARTING );                     // Update state
            this.ioThread.start();                          // Start thread
        }   // end if: currently stopped
    }
/**
     * Attempts to start the server listening and returns immediately.
     * Listen for start events to know if the server was
     * successfully started.
     * 
     * @see Listener
     */
Attempts to start the server listening and returns immediately.
Listen for start events to know if the server was
successfully started.

@see Listener
Attempts to start the server listening and returns immediately . Listen for start events to know if the server was successfully started . @see Listener
public synchronized void start(){
        if( this.currentState == State.STOPPED ){           
            assert ioThread == null : ioThread;             
            Runnable run = new Runnable() {
                @Override
                public void run() {
                    runServer();                            
                    ioThread = null;          
                    setState( State.STOPPED );              
                }   
            };  nable
            if( this.threadFactory != null ){               
                this.ioThread = this.threadFactory.newThread(run);
            } else {                                        
                this.ioThread = new Thread( run, this.getClass().getName() );   
            }
            setState( State.STARTING );                     
            this.ioThread.start();                          
        }   
    }
public synchronized void start ( ) { if ( this . currentState == State . STOPPED ) { assert ioThread == null : ioThread ; Runnable run = new Runnable ( ) { @ Override public void run ( ) { runServer ( ) ; ioThread = null ; setState ( State . STOPPED ) ; } } ; if ( this . threadFactory != null ) { this . ioThread = this . threadFactory . newThread ( run ) ; } else { this . ioThread = new Thread ( run , this . getClass ( ) . getName ( ) ) ; } setState ( State . STARTING ) ; this . ioThread . start ( ) ; } }
Attempts to start the server listening and returns immediately.
Attempts to start the server listening and returns immediately .
// Only if we're stopped now // Shouldn't have a thread // This runs for a long time // Clear thread // end run // end runnable // User-specified threads // Our own threads // Named // Update state // Start thread // end if: currently stopped