Discussion

Left ArrowBack to discussions page
LuWeifengLuWeifeng Posts: 1Unconfirmed Recruit
With a Universal Robot, it's said data stream can be accessible on TCP port 63351. But how to extract this data stream one by one using C++ language? Here is my sample codes:

socketHandle=socket(AF_INET,SOCK_STREAM,0);
addrCin.sin_addr.S_un.S_addr=inet_addr("10.0.0.2");
addrCin.sin_family=AF_INET;
addrCin.sin_port=htons(63351);
double flagFS=connect(socketHandle,(SOCKADDR*)&addrCin,sizeof(SOCKADDR));
char data[100];
recv( socketHandle, (char *)data, 100, 0 );

The received data is " , 107.940002 , -7.520000 , 0.349000 , -0.298000 , 1.248000)(87.220001 , 107.849998 , -7.540000 , 0. ".
I am very confused about this. Please help me.

Comments

Sign In or Register to comment.
Left ArrowBack to discussions page