[Ns-developers] ns3 TCP merge candidate
Mathieu Lacage
mathieu.lacage at sophia.inria.fr
Wed Jan 23 11:06:28 PST 2008
On Wed, 2008-01-23 at 13:36 -0500, Raj Bhattacharjea wrote:
> The core of the issue is that different types of sockets have
> different semantics i.e. stream sockets variously require
> Connect/Listen/Close while datagram types don't. As I see it, there
> are two options
>
> 1. Our generic applications try and figure out what type of
> socket they are using, and use the appropriate semantics.
The proper way to do this would be to use a different base class for
stream-based semantics and for packet-based semantics. However, we did
decide a long time ago that we would not do this and that we would use a
single base class.
> 1. Applications should assume they are working with the socket
> type which is the logical superset of all others, and any
> unsupported specific APIs will all be no-ops with error codes.
> I believe you are advocating #2? I have no problem with this, but
> note that if so, the on-off app needs to change to use stream
> semantics, and I think that essentially all future applications that
> are supposed to work with multiple transport layers will have to talk
> in terms of stream sockets regardless of the actual socket type being
> used.
Yes, we need to fix the applications. It was pretty hard to implement
the applications correctly without a stream-based socket implementation
which is why the current code does not do this correctly.
Mathieu
More information about the Ns-developers
mailing list