use grpc port -1 by default in PyBullet. add grpcClient.py and grpcServer.py

This commit is contained in:
erwincoumans
2018-09-20 09:07:47 -07:00
parent 3de295ca41
commit 616192f80a
5 changed files with 61 additions and 3 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());