|
前一张贴编辑有错误,现在重新发一贴
服务器建在本机每2秒send()一次
客户端连续接收10次,接收完关闭套接口
每次lrs_receive差不多要用十秒时间
5次receive平均响应时间为10.171秒
不知道为什么会这么慢?
vuser_init()
{
lrs_startup(257);
lrs_create_socket("socket0", "TCP", "RemoteHost=zxd-com:6050", LrsLastArg);
return 0;
}
Action()
{
int i=0;
for(i=0;i<5;i++){
lrs_receive("socket0", "buf0", LrsLastArg);
}
return 0;
}
vuser_end()
{
lrs_cleanup();
return 0;
}
//以下是录制日志
/* New recording mechanism */
00:46:22.140 /* Start section (Action) */
00:46:22.765 /* WSAStartup(): process 5992 using flags 0 */
00:46:22.765 /* ReadCommWindowInfo: HttpInterceptMode = 0 */
00:46:22.781 /* socket(): created with handle: 5992:208, address format 2, type 1, protocol 0. */
00:46:22.781 /* setsockopt(): socket 5992:208, level: 0xffff, optname: 0x1002, optval: 5120 */
00:46:22.796 /* connect(): socket 5992:208 tried to connect with family 2, port 6050, and address 0xc0a80002. Return value: 0 */
00:46:25.812 /* recv(): 1024 bytes were received from socket 5992:208 using flags 0 (5120 were asked for) */
(recv_0, 5120, 208)
"\x02\x02\x02\x02\x02\x02\x02\x02\x02\x02\x02\x02\x02\x02\x02\x02\x02\x02\x02"
"\x02\x02\x02\x02\x02\x02\x02\x02\x02\x02\x02\x02\x02\x02\x02\x02\x02\x02\x02"
"\x02\x02\x02\x02\x02\x02\x02\x02\x02\x02\x02\x02\x02\x02\x02\x02\x02\x02\x02"
"\x02\x02\x02\x02\x02\x02\x02\x02\x02\x02\x02\x02\x02\x02\x02\x02\x02\x02\x02"
"\x02\x02\x02\x02\x02\x02\x02\x02\x02\x02\x02\x02\x02\x02\x02\x02\x02\x02\x02"
。。。。。。。。。。。。。。。。。 |
|