|
部分代码如下:其中建立有udp的通信方式,但是其端口为随机端口,请问大家这个该怎么办啊,设置成随即数吗?
Action()
{
lrs_create_socket("socket0", "UDP", LrsLastArg);
lrs_send("socket0", "buf0", "TargetSocket=xxxxxxxx:58642", LrsLastArg);
lrs_create_socket("socket3", "TCP", "RemoteHost=xxxxxxxx:23246", LrsLastArg);
lr_think_time(38);
lrs_create_socket("socket4", "UDP", "LocalHost=58646", LrsLastArg);
lrs_send("socket4", "buf3", "TargetSocket=xxxxxxxx:58645", LrsLastArg);
lrs_send("socket0", "buf4", "TargetSocket=xxxxxxxx:58642", LrsLastArg);
lr_think_time(60);
lrs_send("socket0", "buf5", "TargetSocket=xxxxxxxx:58642", LrsLastArg);
lr_think_time(54);
lrs_send("socket3", "buf6", LrsLastArg);
lrs_disable_socket("socket3", DISABLE_SEND_RECV);
lrs_close_socket("socket3");
return 0;
} |
|