Code example for InetSocketAddress

0
            logFile.mkdirs();
        } 
 
        ZooKeeperServer server = new ZooKeeperServer(snapFile, logFile, this.tickTime);
        this.standaloneServerFactory =
                NIOServerCnxnFactory.createFactory(new InetSocketAddress(this.port), this.maxConnections);
        this.standaloneServerFactory.startup(server);
        logger.info("Startup zookeeper server at port :" + this.port);
    } 
 
 
    public void stop() { 
        if (this.standaloneServerFactory != null) {
            this.standaloneServerFactory.shutdown();
        } 
    } 
 
}