protected ServerSocket createServerSocket() throws IOException {
  InetSocketAddress isa;
  if (this.bindAddress == null) {
    isa=new InetSocketAddress(this.port);
  }
 else {
    isa=new InetSocketAddress(this.bindAddress,this.port);
  }
  ServerSocket serverSocket=new ServerSocket();
  serverSocket.bind(isa,this.backlog);
  if (this.port == 0) {
    this.port=serverSocket.getLocalPort();
  }
  return serverSocket;
}

protected ServerSocket createServerSocket ( ) throws IOException { InetSocketAddress isa ; if ( this . bindAddress == null ) { isa = new InetSocketAddress ( this . port ) ; } else { isa = new InetSocketAddress ( this . bindAddress , this . port ) ; } ServerSocket serverSocket = new ServerSocket ( ) ; serverSocket . bind ( isa , this . backlog ) ; if ( this . port == 0 ) { this . port = serverSocket . getLocalPort ( ) ; } return serverSocket ; }
override this method if you want to create your own server sockets . you must return a bound serversocket instance
