Open jwakely opened 8 years ago
On 10 Oct 2015, at 4:09 am, Jonathan Wakely notifications@github.com wrote:
Returns: If h is an open native socket, socket_type(ctx, s); otherwise socket_type(ctx).
What is s?
Should it be sockettype(ctx, protocl, h) ?
Thanks, fixed in d4e7929eeef9f4ebdf7c2f8d8c7282f6719b8c2e. The problem affected asyncaccept too (missing protocol argument).
Also, for those latter overloads, should there be a requirement that endpoint.protocol() == protocol_ ?
On entry to the function, no. Those are output parameters e.g. in the case where you're using an IP socket, the protocol of the socket could be either IPv4 or v6, but the caller doesn't have to care.
On successful exit, yes, but I assume that specifying in terms of POSIX accept() covers that behaviour. Is that good enough?
What is
s
?Should it be
socket_type(ctx, protocl_, h)
?The problem appears twice, in
and
Also, for those latter overloads, should there be a requirement that
endpoint.protocol() == protocol_
?