kohlschutter / junixsocket

Unix Domain Sockets in Java 7 and newer (AF_UNIX), AF_TIPC, AF_VSOCK, and more
Apache License 2.0
433 stars 114 forks source link

Is JavaHttpServer supported over JUnixSocket? #72

Closed rajulm closed 4 years ago

rajulm commented 4 years ago

Thanks for writing this code and making our lives a lot easier.

My use case is to have http over unix sockets to serve requests like as below:

curl --unix-socket /var/run/docker.sock http://localhost/images/json

Is it possible to have a Java http server over JunixSockets out of the box? Or do I need to write the server code on my own? I tried hooking this code up somehow in the HttpServer code that we have but unfortunately it doesn't support the JUnixSockets out of the box.

kohlschuetter commented 4 years ago

Hi rajulm, I added support in commit 25b8340692ed1f67704c9c9ed16b9e39d1d5a9b2. Please verify it works for you!

kohlschuetter commented 4 years ago

Please verify on junixsocket 2.3.0, which was released today. Thanks!