|
本帖最后由 niudaye 于 2016-8-19 08:10 编辑
socket协议
Action()
{
lr_start_transaction("KS");
lrs_create_socket("socket1","TCP","RemoteHost=10.0.1.89:9990",LrsLastArg);
lrs_send("socket1", "buf0", LrsLastArg);
lrs_receive("socket1", "buf1", LrsLastArg);
lrs_close_socket("socket1");
lr_end_transaction("KS", LR_AUTO);
return 0;
}
.......................
ws文件里
;WSRData 2 1
send buf0 119
"7e090002001c31393742433844452d313338432d343545322d413732312d44384643373631423136363600000000e2c300771cee1ad2b960a675633fd0dc51c60d830000000000000000000000000000000000000000000000000001ab0003160803144756000000000001d1e21a06d0a3200015003a00"
recv buf1 *
-1
问题 怎么将7e090002001c31393742433844452d313338432d343545322d413732312d44384643373631423136363600000000e2c300771cee1ad2b960a675633fd0dc51c60d830000000000000000000000000000000000000000000000000001ab0003160803144756000000000001d1e21a06d0a3200015003a00
转换lr可读的东东进行发送,这设计到16进制的转换吧 ,求完整代码 |
|