This commit is contained in:
Erwin Coumans
2018-09-21 09:56:25 -07:00
6 changed files with 62 additions and 4 deletions

View File

@@ -67,7 +67,11 @@ struct GRPCNetworkedInternalData
{
if (m_isConnected)
return true;
std::string hostport = m_hostName + ':' + std::to_string(m_port);
std::string hostport = m_hostName;
if (m_port >= 0)
{
hostport += ':' + std::to_string(m_port);
}
m_grpcChannel = grpc::CreateChannel(
hostport, grpc::InsecureChannelCredentials());

View File

@@ -255,7 +255,11 @@ int main(int argc, char** argv)
int port = 6667;
parseArgs.GetCmdLineArgument("port", port);
std::string hostName = "localhost";
std::string hostNamePort = hostName + ":" + std::to_string(port);
std::string hostNamePort = hostName;
if (port>=0)
{
hostNamePort += ":" + std::to_string(port);
}
gVerboseNetworkMessagesServer = parseArgs.CheckCmdLineFlag("verbose");