private void startConnect() throws IOException {
if(!isFirstConnect){
try {
Thread.sleep(r.nextInt(1000));
} catch (InterruptedException e) {
LOG.warn("Unexpected exception", e);
}
}
state = States.CONNECTING;
InetSocketAddress addr;
if (rwServerAddress != null) {
addr = rwServerAddress;
rwServerAddress = null;
} else {
addr = hostProvider.next(1000);
}
LOG.info("Opening socket connection to server " + addr);
setName(getName().replaceAll("\\(.*\\)",
"(" + addr.getHostName() + ":" + addr.getPort() + ")"));
clientCnxnSocket.connect(addr);
}
ClientCnxn.java 文件源码
java
阅读 38
收藏 0
点赞 0
评论 0
项目:bigstreams
作者:
评论列表
文章目录