Following this discussion on Gitter it appears feasible to add support for unix sockets to fs2 based on jnr-unixsockets.
As a use case example this could benefit a library like tpolecat/skunk to talk to a postgres database via unix sockets as it is done on Google Cloud (Run).
I think @ChristopherDavenport implemented this recently. I'd be happy to incorporate it in to fs2-io if Chris wants but knowing Chris, it's already available somewhere. :)
https://github.com/ChristopherDavenport/whale-tail/blob/master/core/src/main/scala/io/chrisdavenport/whaletail/UnixSocket.scala - Works like a charm. Was going to move it into a library of its own.
Always happy to get code off my hands though if you want it.
Otherwise I was going to move it into something like fs2-unixsocket or something to that effect here shortly. Was finishing ember to prove all my concepts work. But its pretty solid at communicating with the docker daemon already.
Alright, going to contribute this as a new module to fs2 as long as everyone is happy.
I don't have an immediate use for this, I was just investigating the topic and wanted to document the gitter discussion in the issues to provide a better point of reference for other people searching for this. Knowing that I can find a solution for this in the whaletail repo is totally sufficient for me, but having a proper fs2 module would certainly be a convenient solution.
Probably a very rare use-case, but the jnr-unixsocket library relies on https://github.com/jnr/jnr-ffi which makes use of dynamic class loading for platform-specific stuff, which breaks immediately when building with graalvm native-image (no fallback)
Also there's JEP effort to provide a generic solution in the JDK itself: https://openjdk.java.net/jeps/380 which hopefully won't rely on dynamic class loading, so should be more portable.
Most helpful comment
Alright, going to contribute this as a new module to fs2 as long as everyone is happy.