You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I've used (a copy of) UnixDomainSocketEndPoint to connect to a unix socket with an abstract address (path starts with a zero-byte). The connect call failed with ECONNREFUSED. When I changed the implementation to pass 2 + _encodedPath.Length instead of s_nativeAddressSize in Serialize the connect works.
* abstract: an abstract socket address is distinguished (from a
pathname socket) by the fact that sun_path[0] is a null byte
('\0'). The socket's address in this namespace is given by the
additional bytes in sun_path that are covered by the specified
length of the address structure. (Null bytes in the name have no
special significance.) The name has no connection with filesystem
pathnames. When the address of an abstract socket is returned,
the returned addrlen is greater than sizeof(sa_family_t) (i.e.,
greater than 2), and the name of the socket is contained in the
first (addrlen - sizeof(sa_family_t)) bytes of sun_path. The
abstract socket namespace is a nonportable Linux extension.
So, this is a Linux-specific, and special-purpose, usage of UNIX-domain sockets. I think this is outside of the scope of the (internal) UnixDomainSocketEndPoint type.
I've used (a copy of) UnixDomainSocketEndPoint to connect to a unix socket with an abstract address (path starts with a zero-byte). The connect call failed with ECONNREFUSED. When I changed the implementation to pass
2 + _encodedPath.Length
instead ofs_nativeAddressSize
in Serialize the connect works.\cc @stephentoub
The text was updated successfully, but these errors were encountered: