public boolean bind ( ) { // open our TCP listening ports int successes = 0 ; for ( int port : _ports ) { try { acceptConnections ( port ) ; successes ++ ; } catch ( IOException ioe ) { log . warning ( "Failure listening to socket" , "hostname" , _bindHostname , "port" , port , ioe ) ; } } return successes > 0 ; }
Bind to the socket ports and return true if any of the binds succeeded .