Subject: Re: [[email-masked]: [Tsvwg] SCTP Sockets API Question]

From: "La Monte Henry Piggy Yarroll" <[email-masked]>
Date: Fri, 01 Nov 2002 06:49:22 -0600

On Thu, 31 Oct 2002 08:21:45 -0500, Chuck Winters <[email-masked]> wrote
:
> Randall,
> 
> On Wed, Oct 30, 2002 at 07:32:06AM -0600, Randall Stewart (cisco)
> > wrote: Accept is used to give you an new socket descriptor that
> > holds the incoming association... but that would be the same
> > descriptor in the case of a UDP style socket... Unless you wanted
> > to take one of the associations into its own socket.. but which
> > one? You can't specify an address to accept() so this is why
> > sctppeeloff() was put into the spec..
> > 
> What about accept() have semantics something like sctppeeloff where accept() 
> returns the first association in it's list?

The sctppeeloff() call allows you to extract a single association
which you plan to handle separately, e.g. in another thread.

With your proposed semantics, it would not make very much sense to use
accept() for only a subset of the associations since the semantics
would essentially be "pick a random association to peel off".  If you
use accept() for every association, you have a poor approximation of
the TCP-style interface.

Randy, how about renaming sctppeeloff() to sctp_accept()?

> > Hope that helps..
> > 
> > R
> 
> Chuck
> 
> -- 
> Chuck Winters                            | Email:  [email-masked]
> Distributed Processing Laboratory        | Phone:  856-338-3987
> Lockheed Martin Advanced Technology Labs |
> 1 Federal St - A&E-3W                    |
> Camden, NJ 08102                         |