Unix Domain Socket with Websocket

Christos Vasilakis cvasilak at gmail.com
Fri Jun 11 14:35:44 UTC 2021


Thank you all for your replies.

Kind regards
-Christos

On Fri, Jun 11, 2021 at 12:50 PM Michael McMahon <
michael.x.mcmahon at oracle.com> wrote:

> Yes, it does seem that for local RPC a regular (unix domain) socket should
> suffice
> rather than a websocket.
>
> Also, just to point out that Unix domain socket (channels) have been in
> the JDK
> since Java 16.
>
> - Michael.
> On 11/06/2021 10:22, Daniel Fuchs wrote:
>
> Hi Christos,
>
> The HttpClient doesn't support Unix Domain Socket - only regular
> TCP / TLS.
>
>
> You could of course open a connection with your client using
> a plain Unix Domain SocketChannel [1] using the UNIX
> ProtocolFamilly [2].
>
> best regard,
>
> -- daniel
> [1]
> https://docs.oracle.com/en/java/javase/16/docs/api/java.base/java/nio/channels/SocketChannel.html#open(java.net.ProtocolFamily)
> [2]
> https://docs.oracle.com/en/java/javase/16/docs/api/java.base/java/net/StandardProtocolFamily.html
>
> On 11/06/2021 09:57, Christos Vasilakis wrote:
>
> Hello all,
>
> we've a native application (in C) that exposes a json-rpc interface over a
> Unix Domain Socket  using websocket. I know that the upcoming Java 17
> release will include support for unix domain sockets and I'm wondering if
> the included websocket client  (since Java 11) will also support this
> mechanism ?
>
> If not planned,  any advice on how you can achieve this today ?
>
> * me hopes that I don't need to touch C code and continue with Java :-)
>
> Kind regards,
> -Christos
>
>
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.openjdk.java.net/pipermail/net-dev/attachments/20210611/221c45f6/attachment.htm>


More information about the net-dev mailing list