????????????????????????????????????IP???????????????????????????????????????
???????????д?????????????????????????裺
????????1????????????????????
????rc = lrs_create_socket("socket0"?? "TCP"?? "LocalHost=0"?? "RemoteHost=127.0.0.1:8808"?? LrsLastArg);
???????rc=0?????????????
????????2????????????????
????lrs_send("socket0"??"buf0"?? LrsLastArg);//??socket0????buf0??????
????lrs_receive ("socket0"??"buf1"??LrsLastArg); //??socket0???????????????buf1??
????????3?????????
????lrs_close_socket("socket0");//???
????????????socket??????ε?????????????????????????????????????£?
#define _EOF '#'
#include "lrs.h"
Action()
{
char *recvbuf;
int recvlen=0;
int rc;
lr_start_transaction("Trans_socket");//????
lrs_set_recv_timeout (60??0);//?????????
lr_start_transaction("Conn_socket");
//RemoteHost????????????????????IP     rc = lrs_create_socket("socket0"?? "TCP"?? "LocalHost=0"?? "RemoteHost=127.0.0.1:8808"?? LrsLastArg);
lr_output_message("rc=%d"??rc);
if (rc != 0 ) {
lr_end_transaction("Conn_socket"?? LR_FAIL);
lr_end_transaction ("Trans_socket"?? LR_FAIL);
return 0;
}
lr_end_transaction("Conn_socket"?? LR_PASS);  //?ж?socket???????????????
lr_rendezvous("?????");
lrs_send("socket0"??"buf0"?? LrsLastArg);
lrs_receive ("socket0"??"buf1"??LrsLastArg);
lrs_get_last_received_buffer ("socket0"??&recvbuf??&recvlen);
//?ж?????????????
if(recvlen==304)
lr_end_transaction("Trans_socket"?? LR_PASS);
else
lr_end_transaction ("Trans_socket"?? LR_FAIL);  //?ж????????????????????recvlen????????????????????
lrs_close_socket("socket0");
return 0;
}
????data.ws ????????? buf0 100 ??100????????????x?????16????
???????????????????????