I'd certainly not recommend you calling this on a closed socket, if by
closed you mean fd after `close()` call. The result of
`uv_tcp_getpeername()` may just return data of another connection.

But yeah, EINVAL is the most common error code, I think.


On Mon, Jun 2, 2014 at 5:01 PM, Iñaki Baz Castillo <[email protected]> wrote:

> 2014-06-02 17:21 GMT+02:00 Iñaki Baz Castillo <[email protected]>:
> > This is, I know that both functions can fail with:
> >
> >   EBADF  The argument sockfd is not a valid descriptor.
> >
> > But what is an invalid descriptor once the uv_tcp_init() has gone well?
>
>
> OK, if the socket is now closed then uv_tcp_getpeername() fails with
> EINVAL.
>
> Clear now.
>
> --
> Iñaki Baz Castillo
> <[email protected]>
>
> --
> You received this message because you are subscribed to the Google Groups
> "libuv" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> To post to this group, send email to [email protected].
> Visit this group at http://groups.google.com/group/libuv.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"libuv" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/libuv.
For more options, visit https://groups.google.com/d/optout.

Reply via email to