|
actiion代码如下:
Action()
{
char *BufVal;
int iVal,iLength,i,j;
lrs_create_socket("socket0", "TCP", "LocalHost=0", "RemoteHost=lzhg:7001", LrsLastArg);
lrs_send("socket0", "buf0", LrsLastArg);
lrs_receive("socket0", "buf1", LrsLastArg);
lrs_get_last_received_buffer("socket0",&BufVal,&iLength);
lr_output_message("the buffer is:%s",BufVal);
lrs_close_socket("socket0");
lrs_create_socket("socket1", "TCP", "LocalHost=0", "RemoteHost=lzhg:7001", LrsLastArg);
lrs_send("socket1", "buf2", LrsLastArg);
lrs_receive("socket1", "buf3", LrsLastArg);
lrs_close_socket("socket1");
lrs_create_socket("socket2", "TCP", "LocalHost=0", "RemoteHost=lzhg:7001", LrsLastArg);
lrs_send("socket2", "buf4", LrsLastArg);
lrs_receive("socket2", "buf5", LrsLastArg);
lrs_close_socket("socket2");
lrs_create_socket("socket3", "TCP", "LocalHost=0", "RemoteHost=lzhg:7001", LrsLastArg);
lrs_send("socket3", "buf6", LrsLastArg);
lrs_receive("socket3", "buf7", LrsLastArg);
lrs_close_socket("socket3");
return 0; |
|