Comments (6)
I would not expect this library to work at all on Windows since there's no unix socket support there. The error is pretty weird but even without that it wouldn't work anyway.
from jnr-unixsocket.
So I think the only thing to do here would be to make the error more explicit about not working on Windows. Despite the odd error, this is failing to locate the "socket" function. I will look into improving that error and also making jnr-unixsocket report that it can't run on Windows.
from jnr-unixsocket.
If you get a chance, can you run this passing -Djnr.ffi.asm.enabled=false
to the JVM? It would get me a better stack trace. I don't have Windows handy at the moment.
from jnr-unixsocket.
Thank you @enebo for providing the longer trace I requested above:
java.lang.UnsatisfiedLinkError: native method 'socket' not found for method public abstract int jnr.unixsocket.Native$LibC.socket(int,int,int)
at jnr.ffi.provider.jffi.DefaultInvokerFactory$FunctionNotFoundInvoker.invoke(DefaultInvokerFactory.java:466)
at jnr.ffi.provider.NativeInvocationHandler.invoke(NativeInvocationHandler.java:47)
at com.sun.proxy.$Proxy6.socket(Unknown Source)
at jnr.unixsocket.Native.socket(Native.java:92)
at jnr.unixsocket.UnixServerSocketChannel.<init>(UnixServerSocketChannel.java:43)
at jnr.unixsocket.UnixServerSocket.<init>(UnixServerSocket.java:32)
at jnr.unixsocket.UnixServerSocketChannel.open(UnixServerSocketChannel.java:53)
at jnr.unixsocket.UnixSocketChannelTest.startServer(UnixSocketChannelTest.java:95)
at jnr.unixsocket.UnixSocketChannelTest.testInterruptRead(UnixSocketChannelTest.java:59)
On that system it appears that the encoding of the string is correct, but I do not see your original error in the issue report. What code page or encoding do you have configured on Windows? I suspect it's a multi-byte encoding that's getting mangled in our error message here.
In any case, there's only two things to fix:
- Ensure the function name is encoded properly for the error message, when it does not exist (probably a jnr-ffi fix)
- Fail earlier in jnr-unixsocket when the necessary functions can't be linked.
from jnr-unixsocket.
So I think the only thing to do here would be to make the error more explicit about not working on Windows. Despite the odd error, this is failing to locate the "socket" function. I will look into improving that error and also making jnr-unixsocket report that it can't run on Windows.
Thank you very much for replying to this question. I have just learned that windows does not support unix domain socket. I want to run unix domain socket on windows mainly because my development environment is windows, but my running environment is linux, so I am switching the development environment to a linux server, hoping to run normally there.
from jnr-unixsocket.
@Wenenen Good luck!
from jnr-unixsocket.
Related Issues (20)
- Licence conflict HOT 7
- Support for ppc64le HOT 4
- Allow Setting Socket Type on Creation HOT 1
- jnr-unixsocket v0.23 and above forces osgi.ee;filter:="(&(osgi.e e=JavaSE)(version=9.0))" HOT 3
- Read response from server, Unix Datagram socket HOT 1
- Implement sendmsg to pass control messages HOT 1
- After channel close, read and write calls were using recycled file descriptor HOT 2
- UnixServer example doesn't work on Mac with either nc or socat HOT 8
- Null PollSelectionKey attachment causes IllegalStateException in jetty HOT 1
- Support for AIX v7.2 64-bit
- Found interface org.objectweb.asm.ClassVisitor, but class was expected HOT 2
- Smoke test fails sporadically on MacOS
- on ppc64le credentials are wrongly parsed/obtained HOT 3
- Solaris can't set socket options HOT 11
- UnixServerSocketChannel extending java.nio.channels.ServerSocketChannel
- No exception while using PrintWriter and outputstream HOT 9
- Support for M1 Mac? HOT 4
- UnixClient fails sporadically on Darwin HOT 1
- Datagram support HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from jnr-unixsocket.