use of com.questdb.net.StatsCollectingReadableByteChannel in project questdb by bluestreak01.
the class JournalClient method openChannel.
private void openChannel() throws JournalNetworkException {
if (this.channel == null || !this.channel.isOpen()) {
SocketChannel channel = config.openSocketChannel();
try {
statsChannel = new StatsCollectingReadableByteChannel(channel.getRemoteAddress());
} catch (IOException e) {
throw new JournalNetworkException("Cannot get remote address", e);
}
SslConfig sslConfig = config.getSslConfig();
if (sslConfig.isSecure()) {
this.channel = new SecureSocketChannel(channel, sslConfig);
} else {
this.channel = channel;
}
}
}
Aggregations