2 possibilities:

1) The application can explicitly cast the received stream into a UnixConn, by way of File(): `UnixConn(net.FileConn(msg.Stream.File()))`

2) If there is a reliable way to detect that a file descriptor is a unix socket, that could be done automatically in the line you highlighted.