start_port++;
if (start_port==end_port) throw new BindException("No available port to bind to"); start_port++;
    protected ServerSocket createServerSocket(int start_port) throws Exception {        ServerSocket ret=null;        while(true) {            try {                if(bind_addr == null)                    ret=new ServerSocket(start_port);                else                    ret=new ServerSocket(start_port, backlog, bind_addr);            }            catch(BindException bind_ex) {                start_port++;                continue;            }            catch(IOException io_ex) {                if(log.isErrorEnabled()) log.error("exception is " + io_ex);            }            srv_port=start_port;            break;        }        return ret;    }