Search code examples
scalaakkaunix-socket

How can one connect to a Unix socket using akka?


While it is relatively easy to connect to an java.net.InetSocketAddress using TCP or UDP in akka, there seems to be no equivalent for SocketAddress and Unix-sockets in the API.

For my current project i need to connnect to the Docker Remote-API using a Unix-Socket. Is there some way to do this using akka or do i need to use a different approach?


Solution

  • Alpakka (Akka's reactive stream implementation) has an implementation that supports UNIX domain sockets : https://doc.akka.io/docs/alpakka/current/unix-domain-socket.html

    As the name implies : No supported on Win32.