Giter Club home page Giter Club logo

junixsocket's Introduction

junixsocket

junixsocket is a Java/JNI library that allows the use of Unix Domain Sockets (AF_UNIX sockets), and other address/protocol families (such as AF_TIPC and AF_VSOCK), from Java.

Unix sockets API, in Java, AF.

  • junixsocket is the most complete implementation of AF_UNIX sockets for the Java ecosystem.
  • Supports other socket types, such as TIPC (on Linux) and VSOCK (on Linux, and certain macOS VMs), as well!
  • Comes with pre-built native libraries for most operating systems and platforms, including macOS, Linux, Windows, Solaris, FreeBSD, NetBSD, OpenBSD, DragonFlyBSD, AIX, IBM i.
  • Additionally, you can build and run junixsocket natively on IBM z/OS (experimental).
  • Supports all Java versions since Java 8*
  • Supports both the Java Socket API and NIO (java.net.Socket, java.net.SocketChannel, etc.)
  • Supports streams and datagrams.
  • Supports Remote Method Invocation (RMI) over AF_UNIX.
  • Supports JDBC database connectors (connect to a local database server via Unix sockets).
    • Generic AFUNIXSocketFactory for databases like PostgreSQL
    • Custom socket factory for MySQL Connector/J, as recommended by Oracle
  • Supports peer credentials.
  • Supports sending and receiving file descriptors.
  • Supports the abstract namespace on Linux.
  • Supports socketpair, and instantiating socket classes from file descriptors.
  • Supports HTTP over UNIX sockets (using NanoHTTPD, OkHttp, and jetty).
  • Supports JPMS/Jigsaw modules. The project is modularized so you can install only what you need.
  • Supports GraalVM native-image AOT/ahead-of-time compilation (since 2.6.0)
  • Provides a selftest package with 100+ tests to ensure compatibility with any target platform.
  • Apache 2.0 licensed.

* (Tested up to Java 19; support for Java 7 was dropped in version 2.5.0).

Quick links

Licensing

junixsocket is released under the Apache 2.0 License.

Commercial support is available through Kohlschütter Search Intelligence.

Self-test

To verify that the software works as expected on your platform, you can run the junixsocket-selftest program, which is located in the "junixsocket-dist" distribution package, and also released on GitHub.

java -jar junixsocket-selftest-VERSION-jar-with-dependencies.jar

(with VERSION being the corresponding junixsocket version).

Maven dependency

To include the core junixsocket functionality in your project, add the following Maven dependency

NOTE Since version 2.4.0, junixsocket-core is POM-only (that's why you need to specify <type>pom</type>)

<dependency>
  <groupId>com.kohlschutter.junixsocket</groupId>
  <artifactId>junixsocket-core</artifactId>
  <version>2.6.2</version>
  <type>pom</type>
</dependency>

While you should definitely pin your dependency to a specific version, you are very much encouraged to always update to the most recent version. Check back frequently.

For more, optional packages (RMI, MySQL, Jetty, TIPC, VSOCK, server, GraalVM, etc.) and Gradle instructions see here

If you're testing a -SNAPSHOT version, make sure that the Sonatype snapshot repository is enabled in your POM:

<repositories>
    <repository>
        <id>sonatype.snapshots</id>
        <name>Sonatype snapshot repository</name>
        <url>https://oss.sonatype.org/content/repositories/snapshots/</url>
        <layout>default</layout>
        <snapshots>
            <enabled>true</enabled>
        </snapshots>
    </repository>
</repositories>

NOTE Never rely on -SNAPSHOT builds. They can break any time.

junixsocket's People

Contributors

darinhoward avatar dependabot[bot] avatar dmpanov avatar gesellix avatar kohlschuetter avatar rraptorr avatar

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.