File path = new File("/var/run/test.sock");
UnixSocketAddress address = new UnixSocketAddress(path);
UnixSocketChannel channel = UnixSocketChannel.open(address);
but get an exception:
Exception in thread "main" java.io.IOException: Protocol wrong type for socket
at jnr.unixsocket.UnixSocketChannel.doConnect(UnixSocketChannel.java:127)
at jnr.unixsocket.UnixSocketChannel.connect(UnixSocketChannel.java:136)
at jnr.unixsocket.UnixSocketChannel.open(UnixSocketChannel.java:68)
I use jnr-unixsocket v0.18 under linux like this:
but get an exception: