[Ns-developers] TCP and UDP layer refactoring
Tom Henderson
tomh at tomh.org
Wed Jul 9 09:55:08 PDT 2008
>-----Original Message-----
>From: Mathieu Lacage [mailto:mathieu.lacage at sophia.inria.fr]
>Sent: Wednesday, July 9, 2008 07:23 AM
>To: 'Tom Henderson'
>Cc: 'Sébastien Vincent', ns-developers at ISI.EDU
>Subject: Re: [Ns-developers] TCP and UDP layer refactoring
>
<snip>
>
>Note that this does not _require_ you to implement multiple tcp sockets
>for ipv4 and ipv6. It just requires you to implement multiple socket
>factories: TcpIpv4SocketFactory and TcpIpv6SocketFactory (and,
>potentially, if you think it is useful, TcpSocketFactory). Each of these
>factories could potentially create instances of the same object type if
>it is easier from an implementation perspective but what matters is that
>these different socket instances have very slightly different semantics
>with regard to address type checking.
>
Mathieu,
I agree with your reasoning on this. I probably would opt for the multiple factories as you suggest. The TypeId "ns3::UdpIpv4SocketFactory" is then kind of serving as a complete replacement for the domain/type/protocol tuple of the socket() call.
More information about the Ns-developers
mailing list