add a b3Clock::usleep in PhysicsClientUDP to avoid clogging all resources
report more meaningful connection status for UDP.
This commit is contained in:
@@ -10,11 +10,19 @@ b3PhysicsClientHandle b3ConnectPhysicsUDP(const char* hostName, int port)
|
||||
|
||||
UdpNetworkedPhysicsProcessor* udp = new UdpNetworkedPhysicsProcessor(hostName, port);
|
||||
|
||||
PhysicsDirect* direct = new PhysicsDirect(udp,true);
|
||||
PhysicsDirect* direct = new PhysicsDirect(udp, true);
|
||||
|
||||
bool connected;
|
||||
connected = direct->connect();
|
||||
printf("direct!\n");
|
||||
if (connected)
|
||||
{
|
||||
printf("b3ConnectPhysicsUDP connected successfully.\n");
|
||||
}
|
||||
else
|
||||
{
|
||||
printf("b3ConnectPhysicsUDP NOT connected.\n");
|
||||
|
||||
}
|
||||
return (b3PhysicsClientHandle)direct;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user