public SnappyTSocket(InetAddress srvAddress, int port, String clientId,
boolean useSSL, boolean blocking, boolean framedWrites,
int timeout, SocketParameters params) throws TTransportException {
try {
this.socketChannel = initSocket(blocking);
this.socketAddress = new InetSocketAddress(srvAddress, port);
this.framedWrites = framedWrites;
setProperties(socketChannel.socket(), timeout, params);
this.dataChannel = openChannel(clientId, useSSL, params);
this.socketToSameHost = ClientSharedUtils.isSocketToSameHost(dataChannel);
} catch (IOException ioe) {
close();
throw new TTransportException(TTransportException.NOT_OPEN,
"Failed to create or configure socket.", ioe);
}
}