TooTallNate / Java-WebSocket

A barebones WebSocket client and server implementation written in 100% Java.
http://tootallnate.github.io/Java-WebSocket
MIT License
10.52k stars 2.58k forks source link

Can I use this Library to connect to Unix Domain Socket. #716

Closed princrai closed 6 years ago

princrai commented 6 years ago

Hello,

I am looking for some java library to connect to a process(daemon) which is listening on a unix domain socket. Not sure if this library can be used for that. Apart from that I am currently using JUnixSocket to write and read through the socket, but the read is causing the CPU spikes as it waits for the daemon to return the data back and at that that it keep blocked on the read() function.

marci4 commented 6 years ago

Hello @princrai,

as far as I know this is not possible. This library implements RFC 6455 and to my knowledge there is now way to access a IPC socket using websockets.

Best regards, marci4

PhilipRoman commented 6 years ago

Apparently node.js supports this. See this question on stackoverflow. They are using a cool syntax for the url: var client = new ws("ws+unix:///tmp/server.sock")

marci4 commented 6 years ago

Is this issue solved for you?

Best regards, marci4

princrai commented 6 years ago

I am trying Netty library to connect to Unix Socket. And getting some good result(latency,throughput).

Thanks, Prince

On Tue, Jul 3, 2018 at 1:05 PM Marcel Prestel notifications@github.com wrote:

Is this issue solved for you?

Best regards, marci4

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/TooTallNate/Java-WebSocket/issues/716#issuecomment-402277030, or mute the thread https://github.com/notifications/unsubscribe-auth/AL5Glb0goaEE4LbClNt6UXdutk7Tmqf6ks5uC86hgaJpZM4UT_28 .