I'm left curious as to why particularly given that I'm having a problem with half-closing Unix sockets. My understanding is that a native read could return zero on receipt of a FIN. I'm not sure if my problem is related, but I'd still like to understand why the translation is performed.
I noticed that when reading from a Unix socket, if the return value of a native
read
call is0
then it is returned to the caller as-1
. Relevant code:https://github.com/jnr/jnr-unixsocket/blob/master/src/main/java/jnr/enxio/channels/Common.java#L59
I'm left curious as to why particularly given that I'm having a problem with half-closing Unix sockets. My understanding is that a native
read
could return zero on receipt of aFIN
. I'm not sure if my problem is related, but I'd still like to understand why the translation is performed.Thanks.