invesdwin / invesdwin-context-integration

invesdwin-context modules that provide integration features
GNU Lesser General Public License v3.0
1 stars 0 forks source link

implement channel for jnr/enxio #24

Closed subes closed 1 year ago

subes commented 2 years ago

https://github.com/jnr/jnr-unixsocket/tree/master/src/test/java/jnr/unixsocket/example

subes commented 2 years ago

jnr-enxio does not work for TCP (see TCPServer.java)

bind failed: Die Adressfamilie wird von der Protokollfamilie nicht unterstützt

subes commented 2 years ago

won't do for now. With NativeSocket based on JDK file descriptors and native TLS we don't need another native socket implementation

subes commented 1 year ago

Example on how to use JNR/ENXIO: https://github.com/jruby/jruby/tree/master/core/src/main/java/org/jruby/ext/socket

https://github.com/jruby/jruby/blob/a309a88614916621de4cc5dc3693f279dae58d0c/core/src/main/java/org/jruby/ext/ffi/io/FileDescriptorIO.java

subes commented 1 year ago

https://github.com/jnr/jnr-enxio/blob/master/src/test/java/jnr/enxio/example/TCPServer.java

subes commented 1 year ago

found a simple way to implement JNR read/write. Though it is slower than JVM SocketChannel.

https://github.com/invesdwin/invesdwin-context-integration/commit/24f5323af8c919fa58b3e435e7a907019e6a806d