Added server information when starting a connection

This commit is contained in:
nathan 2017-09-26 12:42:36 +02:00
parent 0dcdca8e43
commit fb574189d3

View File

@ -72,6 +72,9 @@ class Client<C extends Connection> extends EndPointClient<C> implements Connecti
return "2.0";
}
private final String localChannelName;
private final String hostName;
/**
* Starts a LOCAL <b>only</b> client, with the default local channel name and serialization scheme
*/
@ -107,6 +110,9 @@ class Client<C extends Connection> extends EndPointClient<C> implements Connecti
throw new IllegalArgumentException(msg);
}
localChannelName = options.localChannelName;
hostName = options.host;
boolean isAndroid = PlatformDependent.isAndroid();
if (isAndroid && options.udtPort > 0) {
@ -314,6 +320,13 @@ class Client<C extends Connection> extends EndPointClient<C> implements Connecti
synchronized (this.shutdownInProgress) {
}
if (localChannelName != null) {
logger.info("Connecting to local server: {}", localChannelName);
}
else {
logger.info("Connecting to server: {}", hostName);
}
// have to start the registration process
this.connectingBootstrap.set(0);
registerNextProtocol();