Skip to content

Commit

Permalink
Use default port if only IP address is specified.
Browse files Browse the repository at this point in the history
  • Loading branch information
parsley72 committed Jan 11, 2014
1 parent 520cf6b commit d1f998d
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion GoFreeWebSocketTest/WebSocketTest/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -407,7 +407,13 @@ static void Main(string[] args)
websocketMFD = new NavicoDiscovery.MFD();
websocketMFD.IP = options.IP;
websocketMFD.Services = new NavicoDiscovery.MFDService[1];
websocketMFD.Services[0] = new NavicoDiscovery.MFDService("", 0, Convert.ToUInt32(options.Port));

uint port = 2053;
if (!options.Port.IsNullOrEmpty())
{
port = Convert.ToUInt32(options.Port);
}
websocketMFD.Services[0] = new NavicoDiscovery.MFDService("navico-nav-ws", 0, port);
}

DbgOutput(string.Format("Connect to {0}:{1}", websocketMFD.IP, websocketMFD.Services[0].Port));
Expand Down

0 comments on commit d1f998d

Please sign in to comment.