TA的每日心情 | 开心 2015-5-3 23:41 |
---|
签到天数: 2 天 连续签到: 1 天 [LV.1]测试小兵
|
vuser_init()
{
int code = 0;
char str[4];
char *port;
lrs_startup(257);
lrs_create_socket("socket0", "TCP", "RemoteHost=10.138.15.67:60000", LrsLastArg);
port = lrs_get_socket_attrib("socket0",LOCAL_PORT );
// lr_think_time(1);
lrs_send("socket0", "buf0", LrsLastArg);
//lrs_set_receive_option(EndMarker,RecordingSize);
lrs_receive("socket0", "buf1", LrsLastArg);
//lrs_save_param("socket0",NULL, "param", 1, 3);
lr_output_message("===========local socket port is : %s",port);
code = lrs_save_param_ex("socket0", "received", NULL, 0, 3,NULL, "param");
lr_output_message("socket return code %d",code);
//lr_think_time(1);
//lr_output_message(lr_eval_string("<param>"));
//lr_output_message(
//lr_output_message((char *)(strstr(lr_eval_string("<param>"),"err")));
//lr_think_time(1);
strcpy(str,lr_eval_string("<param>"));
//lr_output_message(lr_eval_string("<param>"));
if(strcmp(str,"err") == 0)
{
lr_output_message("in err handle!");
return -1;
//vuser_end();
} |
|