| 153 | } |
| 154 | |
| 155 | bool TcpNetworkedPhysicsProcessor::processCommand(const struct SharedMemoryCommand& clientCmd, struct SharedMemoryStatus& serverStatusOut, char* bufferServerToClient, int bufferSizeInBytes) |
| 156 | { |
| 157 | if (gVerboseNetworkMessagesClient2) |
| 158 | { |
| 159 | printf("PhysicsClientTCP::processCommand\n"); |
| 160 | } |
| 161 | |
| 162 | { |
| 163 | int sz = 0; |
| 164 | unsigned char* data = 0; |
| 165 | m_data->m_tempBuffer.clear(); |
| 166 | |
| 167 | if (clientCmd.m_type == CMD_STEP_FORWARD_SIMULATION) |
| 168 | { |
| 169 | sz = sizeof(int); |
| 170 | data = (unsigned char*)&clientCmd.m_type; |
| 171 | } |
| 172 | else |
| 173 | { |
| 174 | if (clientCmd.m_type == CMD_REQUEST_VR_EVENTS_DATA) |
| 175 | { |
| 176 | sz = 3 * sizeof(int) + sizeof(smUint64_t) + 16; |
| 177 | data = (unsigned char*)&clientCmd; |
| 178 | } |
| 179 | else |
| 180 | { |
| 181 | sz = sizeof(SharedMemoryCommand); |
| 182 | data = (unsigned char*)&clientCmd; |
| 183 | } |
| 184 | } |
| 185 | |
| 186 | m_data->m_tcpSocket.Send((const uint8*)data, sz); |
| 187 | } |
| 188 | |
| 189 | return false; |
| 190 | } |
| 191 | |
| 192 | bool TcpNetworkedPhysicsProcessor::receiveStatus(struct SharedMemoryStatus& serverStatusOut, char* bufferServerToClient, int bufferSizeInBytes) |
| 193 | { |
no test coverage detected