[Ns-developers] ns3 TCP merge candidate

George Riley riley at ece.gatech.edu
Thu Jan 24 06:46:48 PST 2008


>>> The correct design is IMHO to make applications only handle "fully  
>>> prepared"
> sockets, i.e. it should be the resonsibility of the client code to  
> create
> and connect the socket prior to handling it to the Application  
> class.  Then
> the Application can just use SendTo (), which works equally well for  
> both
> stream and datagram sockets (right?).
That's one option; yes SendTo is defined and will work for stream  
sockets,
however the "to" parameter is documented to be ignored and you must
have done a prior connect.  Perhaps better is always call  
"connect" (which
for DGram sockets simply sets a default destination, then call send or
write.

George
>
>
> -- 
> Gustavo J. A. M. Carneiro
> INESC Porto, Telecommunications and Multimedia Unit
> "The universe is always one step beyond logic." -- Frank Herbert



More information about the Ns-developers mailing list