Hi guys,
I am trying to simulate a TCP transfer using the OnOff application, but I am having a problem with the OffTime attribute.
My original goal was to have one stream with constant data rate to be transmitting for a long time while there will be another stream transmitting for shorter time and I want to see how the second stream affects the first one. I found out that if I want to transmit larger amount of data, it stops for no reason, so I did some experimenting with the OffTime attribute.
I ran my simulation with this parameter:
onoff1.SetAttribute("OffTime", StringValue("ns3::ConstantRandomVariable[Constant=10]"));
where I set constant to 0, 5 and 10 and it behaved very differently each time. Results are shown in the three following pictures.

I am transferring 500 kB of data.
1) In the first picture, the transfer stops at time 10 s without any reason.
2) In the second picture the transfer works perfectly, except I would prefer if it started at time 0.
3) In the third picture, after the server sends some data it stops for about 5 s and then it starts again.
Can anybody explain to me this behaviour, how this attribute works or how should I set it correctly to get my goal?
Working source code is attached.
Thank you for any help.
Jiri