final ConnectionImpl connection = new ConnectionImpl(socket, messageHandler, readExecutor, callback);
final Thread thread = threadFactory.newThread(connection.getReadTask());
if (thread == null) {
throw MESSAGES.threadCreationRefused();
}
if (bindAddress != null) socket.bind(bindAddress);
if (readTimeout != 0) socket.setSoTimeout(readTimeout);
socket.connect(serverAddress, connectTimeout);
thread.setName("Read thread for " + serverAddress);
thread.start();
CLIENT_LOGGER.tracef("Connected to %s", serverAddress);