mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-06-12 08:23:59 +00:00
update bullet so it actually works
Moved the addSourceDirectory for physics/Bullet into the Engine/Source/CMakeLists.txt file that way it can actually appear where we expect it to in the solution explorer.
This commit is contained in:
parent
c7be48130a
commit
13fa178cf6
5986 changed files with 1811270 additions and 453803 deletions
57
Engine/lib/bullet/test/clsocket/QueryDayTime.cpp
Normal file
57
Engine/lib/bullet/test/clsocket/QueryDayTime.cpp
Normal file
|
|
@ -0,0 +1,57 @@
|
|||
|
||||
#include <string.h>
|
||||
#include "ActiveSocket.h" // Include header for active socket object definition
|
||||
|
||||
int main(int argc, char **argv)
|
||||
{
|
||||
CActiveSocket socket; // Instantiate active socket object (defaults to TCP).
|
||||
char time[50];
|
||||
|
||||
memset(&time, 0, 50);
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
// Initialize our socket object
|
||||
//--------------------------------------------------------------------------
|
||||
socket.Initialize();
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
// Create a connection to the time server so that data can be sent
|
||||
// and received.
|
||||
//--------------------------------------------------------------------------
|
||||
// if (socket.Open("time-C.timefreq.bldrdoc.gov", 13))
|
||||
if (socket.Open("192.168.86.196", 6667))
|
||||
{
|
||||
for (int i = 0; i < 100; i++)
|
||||
{
|
||||
//----------------------------------------------------------------------
|
||||
// Send a requtest the server requesting the current time.
|
||||
//----------------------------------------------------------------------
|
||||
char data[1024];
|
||||
sprintf(data, "%s %d", "Hello", i);
|
||||
int len = strlen(data);
|
||||
data[len] = 0;
|
||||
printf("Sending [%s]\n", data);
|
||||
len++;
|
||||
if (socket.Send((const uint8 *)data, len))
|
||||
{
|
||||
//----------------------------------------------------------------------
|
||||
// Receive response from the server.
|
||||
//----------------------------------------------------------------------
|
||||
int rec = socket.Receive(len);
|
||||
if (rec)
|
||||
{
|
||||
uint8 *data = socket.GetData();
|
||||
memcpy(&time, data, len);
|
||||
printf("Received: [%s]\n", time);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------
|
||||
// Close the connection.
|
||||
//----------------------------------------------------------------------
|
||||
socket.Close();
|
||||
}
|
||||
|
||||
return 1;
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue