Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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?

like image 424
Richard Avatar asked Nov 06 '14 08:11

Richard


People also ask

How do I interact with a Unix Socket?

Unlike standard FIFOs or pipes, work with sockets is done using the sockets interface as opposed to the file interface. The -U parameter tells netcat to use a Unix Socket file, which we have specified. The -l parameter tells it to act as the server-side and listen on the specified socket for incoming connections.

What are Unix domain socket connections?

A Unix domain socket aka UDS or IPC socket (inter-process communication socket) is a data communications endpoint for exchanging data between processes executing on the same host operating system. It is also referred to by its address family AF_UNIX .

Do Unix sockets use TCP?

Stream sockets, which use TCP as their underlying transport protocol. Datagram sockets, which use UDP as their underlying transport protocol. Unix Domain Sockets, which use local files to send and receive data instead of network interfaces and IP packets.

Does Unix Socket have port?

Unix Command Course for Beginners To resolve the problem of identifying a particular server process running on a host, both TCP and UDP have defined a group of well-known ports. For our purpose, a port will be defined as an integer number between 1024 and 65535.


1 Answers

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.

like image 108
Igmar Palsenberg Avatar answered Sep 19 '22 00:09

Igmar Palsenberg