Convert address fields to strings to better manage DNS names

This commit is contained in:
Cameron Gutman
2017-09-09 13:39:20 -07:00
parent e7f92d3667
commit 8584bf1910
6 changed files with 63 additions and 58 deletions
@@ -223,13 +223,7 @@ public class NvConnection {
String appName = context.streamConfig.getApp().getAppName();
try {
context.serverAddress = InetAddress.getByName(host);
} catch (UnknownHostException e) {
context.connListener.connectionTerminated(-1);
return;
}
context.serverAddress = host;
context.connListener.stageStarting(appName);
try {
@@ -249,7 +243,7 @@ public class NvConnection {
// we must not invoke that functionality in parallel.
synchronized (MoonBridge.class) {
MoonBridge.setupBridge(videoDecoderRenderer, audioRenderer, connectionListener);
MoonBridge.startConnection(context.serverAddress.getHostAddress(),
MoonBridge.startConnection(context.serverAddress,
context.serverAppVersion, context.serverGfeVersion,
context.negotiatedWidth, context.negotiatedHeight,
context.negotiatedFps, context.streamConfig.getBitrate(),