MCPcopy Create free account
hub / github.com/bulletphysics/bullet3 / receiveStatus

Method receiveStatus

examples/SharedMemory/PhysicsClientTCP.cpp:192–220  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

190}
191
192bool TcpNetworkedPhysicsProcessor::receiveStatus(struct SharedMemoryStatus& serverStatusOut, char* bufferServerToClient, int bufferSizeInBytes)
193{
194 bool hasStatus = m_data->checkData();
195
196 if (hasStatus)
197 {
198 if (gVerboseNetworkMessagesClient2)
199 {
200 printf("TcpNetworkedPhysicsProcessor::receiveStatus\n");
201 }
202
203 serverStatusOut = m_data->m_lastStatus;
204 int numStreamBytes = m_data->m_stream.size();
205
206 if (numStreamBytes < bufferSizeInBytes)
207 {
208 for (int i = 0; i < numStreamBytes; i++)
209 {
210 bufferServerToClient[i] = m_data->m_stream[i];
211 }
212 }
213 else
214 {
215 printf("Error: steam buffer overflow\n");
216 }
217 }
218
219 return hasStatus;
220}
221
222void TcpNetworkedPhysicsProcessor::renderScene(int renderFlags)
223{

Callers 3

processServerStatusMethod · 0.45
postProcessStatusMethod · 0.45

Calls 2

checkDataMethod · 0.45
sizeMethod · 0.45

Tested by

no test coverage detected