Giter VIP home page Giter VIP logo

ipcsocket's People

Contributors

andrzejressel avatar bhamiltoncx avatar blaisorblade avatar catap avatar eatkins avatar eed3si9n avatar fmvilas avatar ilya-klyuchnikov avatar jimpurbrick avatar justintheice avatar mkurz avatar quelgar avatar sake92 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

ipcsocket's Issues

calling toString() on a connected UnixDomainSocket returns Socket[unconnected]

I noticed that UnixDomainServerSocket returns useful information on a call to toString(), but it's friend UnixDomainSocket does not return useful information, it actually returns incorrect information:
Socket[unconnected]

More useful and correct output would be the path that was used to create the socket.

I have not tested the Win32NamedPipeSocket but I suspect a similar issue would occur.

Doesn't work at Apple's arm64

Hey,

I'm playing for last couple of days with Apple's M1 that is arm64.

Right now sbt doesn't work because of missed JNA/JNI artifact on this project:

java.lang.UnsatisfiedLinkError: /Users/catap/Library/Caches/JNA/temp/jna12016497044725394171.tmp: dlopen(/Users/catap/Library/Caches/JNA/temp/jna12016497044725394171.tmp, 1): no suitable image found.  Did find:
	/Users/catap/Library/Caches/JNA/temp/jna12016497044725394171.tmp: no matching architecture in universal wrapper
	/Users/catap/Library/Caches/JNA/temp/jna12016497044725394171.tmp: no matching architecture in universal wrapper
	at java.base/jdk.internal.loader.NativeLibraries.load(Native Method)
	at java.base/jdk.internal.loader.NativeLibraries$NativeLibraryImpl.open(NativeLibraries.java:383)
	at java.base/jdk.internal.loader.NativeLibraries.loadLibrary(NativeLibraries.java:227)
	at java.base/jdk.internal.loader.NativeLibraries.loadLibrary(NativeLibraries.java:169)
	at java.base/java.lang.ClassLoader.loadLibrary(ClassLoader.java:2383)
	at java.base/java.lang.Runtime.load0(Runtime.java:746)
	at java.base/java.lang.System.load(System.java:1857)
	at com.sun.jna.Native.loadNativeDispatchLibraryFromClasspath(Native.java:1018)
	at com.sun.jna.Native.loadNativeDispatchLibrary(Native.java:988)
	at com.sun.jna.Native.<clinit>(Native.java:195)
	at org.scalasbt.ipcsocket.UnixDomainSocketLibrary.<clinit>(UnixDomainSocketLibrary.java:129)
	at org.scalasbt.ipcsocket.JNAUnixDomainSocketLibraryProvider.socket(UnixDomainSocketLibrary.java:165)
	at org.scalasbt.ipcsocket.UnixDomainServerSocket.<init>(UnixDomainServerSocket.java:109)
	at org.scalasbt.ipcsocket.UnixDomainServerSocket.<init>(UnixDomainServerSocket.java:87)
	at sbt.internal.BootServerSocket.newSocket(BootServerSocket.java:342)
	at sbt.internal.BootServerSocket.<init>(BootServerSocket.java:295)
	at sbt.xMain$.getSocketOrExit(Main.scala:118)
	at sbt.xMain$.run(Main.scala:67)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:64)
	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.base/java.lang.reflect.Method.invoke(Method.java:564)
	at sbt.internal.XMainConfiguration.run(XMainConfiguration.scala:83)
	at sbt.xMain.run(Main.scala:46)
	at xsbt.boot.Launch$$anonfun$run$1.apply(Launch.scala:109)
	at xsbt.boot.Launch$.withContextLoader(Launch.scala:128)
	at xsbt.boot.Launch$.run(Launch.scala:109)
	at xsbt.boot.Launch$$anonfun$apply$1.apply(Launch.scala:35)
	at xsbt.boot.Launch$.launch(Launch.scala:117)
	at xsbt.boot.Launch$.apply(Launch.scala:18)
	at xsbt.boot.Boot$.runImpl(Boot.scala:41)
	at xsbt.boot.Boot$.main(Boot.scala:17)
	at xsbt.boot.Boot.main(Boot.scala)
Error during sbt execution: java.lang.UnsatisfiedLinkError: /Users/catap/Library/Caches/JNA/temp/jna12016497044725394171.tmp: dlopen(/Users/catap/Library/Caches/JNA/temp/jna12016497044725394171.tmp, 1): no suitable image found.  Did find:
	/Users/catap/Library/Caches/JNA/temp/jna12016497044725394171.tmp: no matching architecture in universal wrapper
	/Users/catap/Library/Caches/JNA/temp/jna12016497044725394171.tmp: no matching architecture in universal wrapper

I can build it on the machine, but I need your assistent to explain me how should I do it without sbt :)

Thanks!

Request: JNA-only and JNI-only published separately

I know nothing about the underlying implementation (so feel free to correct my misinterpretation) but a quick glance tells me that there's both a JNA-only and JNI-only implementation, and that the user may freely choose between the two, but only one should be used at runtime.

If so, I believe it would be better if there are separate packages published that users could depend on: one for JNA-only, one for JNI-only, and one for both. Right now, the jar artifact contains both, so for example, even though I'm using only the JNA implementation, I also have the JNI binaries unnecessarily included and thus unused.

I'm using Gradle to include this library as a dependency, and there may be a way to transform the jar artifact, but it seems complicated to do so. It would really be great if the JNA and JNI implementations are available as separate modules.

DuplexTest fails

CI failed immediately upon merge:

https://github.com/sbt/ipcsocket/runs/7058379356?check_suite_focus=true

[client] got a message: hello12
java.lang.InterruptedException: sleep interrupted
	at java.lang.Thread.sleep(Native Method)
	at org.scalasbt.ipcsocket.duplex.Receiver.run(Receiver.java:28)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
	at java.lang.Thread.run(Thread.java:748)
[server] sending msg: 13
[server] sending msg: 14
[error] Test org.scalasbt.ipcsocket.duplex.DuplexTest.testDuplexCommunication failed: expected:<15> but was:<13>, took 18.014 sec

Originally posted by @eed3si9n in #19 (comment)

java.io.IOException: WriteFile() failed: 6

Hi! I'm sometimes getting error code 6. Can it be a misconfiguration on my side, or is it a bug? Thanks!

Stacktrace:

java.io.IOException: WriteFile() failed: 6
            at org.scalasbt.ipcsocket.Win32NamedPipeSocket$Win32NamedPipeSocketOutputStream.write(Win32NamedPipeSocket.java:198)

java.io.IOException: ConnectNamedPipe() failed with: 535

I tried to upgrade to latest version (from 1.0.1 to 1.4.0) of the library and started getting this error sometimes.

    2021-10-05T07:46:06 ERR java.io.IOException: ConnectNamedPipe() failed with: 535
    2021-10-05T07:46:06 ERR 	at org.scalasbt.ipcsocket.Win32NamedPipeServerSocket.accept(Win32NamedPipeServerSocket.java:192)

The last working version that is not exhibiting this problem for me is 1.0.1. OS is windows 10.

Error code 535 is ERROR_PIPE_CONNECTED and it seems to me it should be handled in the source, but somehow it is not.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.