Communication ZeoScript use <atTcpSock>
Posted: Mon May 27, 2013 6:20 am
I have just started learn to ZeoScript and find it very interesting. What I wan'na do is use the <atTcpSock> plugin to make L3DT connectable with my App, which also use winsock2 TCP/IP protocol.
Specifically, my goal is load some custom meshes such as planes into Sapphire 3D viewer, and use external data real-time driving these planes in motion.
External Data like an array [[pos_x,pos_y,pos_z],dir_o,[ver_x,ver_y,ver_z],[des_string],bla1,bla2,bla3...] send with winsock to L3DT pro.
here my questions:
1. <atTcpSock> is not available in L3DT v11.08 and above, I just load it in my old L3DT Pro v2.9, and it's worked. how to make it available in L3DT new versions?
2. I can use ZeoScript to load meshes into Sapphire 3D viewer, but I donn't know how to make a sleep in "do while" loop such as C++ use Sleep(200)?
3. The most critical problem is how to use these functions atTcpSock.Connect, atTcpSock.Accept, atTcpSock.Listen, atTcpSock.GetPeerAddr, atTcpSock.SendMsg, atTcpSock.SendMsgA, atTcpSock.GetRecvQueueSize.... correctly?
can you give me a example script?
I'd much appreciate it if anyone can help.
Specifically, my goal is load some custom meshes such as planes into Sapphire 3D viewer, and use external data real-time driving these planes in motion.
External Data like an array [[pos_x,pos_y,pos_z],dir_o,[ver_x,ver_y,ver_z],[des_string],bla1,bla2,bla3...] send with winsock to L3DT pro.
here my questions:
1. <atTcpSock> is not available in L3DT v11.08 and above, I just load it in my old L3DT Pro v2.9, and it's worked. how to make it available in L3DT new versions?
2. I can use ZeoScript to load meshes into Sapphire 3D viewer, but I donn't know how to make a sleep in "do while" loop such as C++ use Sleep(200)?
3. The most critical problem is how to use these functions atTcpSock.Connect, atTcpSock.Accept, atTcpSock.Listen, atTcpSock.GetPeerAddr, atTcpSock.SendMsg, atTcpSock.SendMsgA, atTcpSock.GetRecvQueueSize.... correctly?
can you give me a example script?
I'd much appreciate it if anyone can help.