On 31/08/16 at 08:29am, Harald Ott wrote:
> So, ok, I could just get the largest occuring size in my input data and
> just set the SndBufSize and RcvBufSize to that value...
If you have losses this approach fails as well, because the buffer will
not be empty when you push the next chunk of data. The general way (and
I mean real world) way to deal with this situation is just queueing that
data in the application and send it down at the next notification, which
in ns-3 is the callback "NotifySend". Take a look at the documentation:
https://www.nsnam.org/docs/models/html/tcp.html#tcp-socket-interaction-and-interface-with-application-layer
> But again here I'm having another problem, using Config::Set to change the
> attributes SndBufSize and RcvBufSize:
>
> I'm using TcpSocketFactory to create my sockets, and I'm trying to set it
> like this
> Config::Set("/NodeList/*/$ns3::TcpL4Protocol/SocketList/*/SndBufSize" ,
> UintegerValue (1000000));
> Config::Set("/NodeList/*/$ns3::TcpL4Protocol/SocketList/*/RcvBufSize" ,
> UintegerValue (1000000));
>
> but nothing happens.... the size seems to remain at the default value...
> what's wrong here ?
>
You probably do it before the Socket creation, and so they don't exists in the
moment you set the Config value. They are created in the application at
the starting time, if I remember correctly.
There is a general dis-agreement on how we can improve the situation. My
current proposal is to add a "SetSocket" API on the applications, create
the sockets in the main () function, updating all the attributes on the
real pointers, and then call explicitly
application->SetSocket(mySocket);
basically because I like raw pointers. There are many other variants
(e.g. set a callback that fires 1 ns after the starting time and
configure appropriately with paths), you can use the method you like
more.
PS: I don't like being pushed privately.
Nat