protected void addConnection ( Socket socket ) throws IOException { FTPConnection con = createConnection ( socket ) ; synchronized ( listeners ) { for ( IFTPListener l : listeners ) { l . onConnected ( con ) ; } } synchronized ( connections ) { connections . add ( con ) ; } }
Called when a connection is created .