network UDP: transmit structural DNA to deal with version/platform differences.

pybullet: allow to specify shared memory key and hostname/port for UDP.
This commit is contained in:
erwincoumans
2016-11-04 17:06:55 -07:00
parent 0ffd68ac32
commit 5d66ce20e0
5 changed files with 135 additions and 10 deletions

View File

@@ -446,6 +446,26 @@ public:
btAlignedFree(m_dna);
}
static int getMemoryDnaSizeInBytes()
{
const bool VOID_IS_8 = ((sizeof(void*) == 8));
if (VOID_IS_8)
{
return sBulletDNAlen64;
}
return sBulletDNAlen;
}
static const char* getMemoryDna()
{
const bool VOID_IS_8 = ((sizeof(void*) == 8));
if (VOID_IS_8)
{
return (const char*)sBulletDNAstr64;
}
return (const char*)sBulletDNAstr;
}
void insertHeader()
{
writeHeader(m_buffer);