junixsocket is a Java/JNI library that allows the use of Unix Domain Sockets (AF_UNIX sockets) from Java.
- junixsocket is a small, modular library. Install only what you need.
- In contrast to other implementations, junixsocket extends the Java Sockets API (
java.net.Socket
,java.net.SocketAddress
, etc.) - Supports RMI over AF_UNIX.
- Database support (connect to a local database server via Unix sockets and JDBC).
- MySQL (provides a custom AFUNIXDatabaseSocketFactory for Connector/J).
- PostgreSQL and others (provides a generic AFUNIXSocketFactory with a variety of configuration options).
- Supports peer credentials.
- Supports sending and receiving file descriptors.
- Supports the abstract namespace on Linux.
- Supports Java 8, 9, 10, 11, 12.
- Comes with pre-built native libraries for macOS, Linux and Windows; custom libraries can be built using Maven.
- Supports JPMS/Jigsaw modules.
- Apache 2.0 licensed.
-
- Sockets (
org.newsclub.net.unix.demo
) - RMI over Unix Sockets (
org.newsclub.net.unix.demo.rmi
andorg.newsclub.net.unix.demo.rmi.services
) - MySQL over Unix Sockets (
org.newsclub.net.mysql.demo
)
- Sockets (
-
API Javadocs
Project | License | Java Sockets API | Supports MySQL | Supports RMI | Comments |
---|---|---|---|---|---|
junixsocket | Apache 2.0 | ✅ Yes | ✅ Yes | ✅ Yes | This project |
netty | Apache 2.0 | ✅ Yes | ❌ No | ❌ No | |
JUDS | LGPL | ❌ No | ❌ No | ❌ No | |
J-BUDS | LGPL | ❌ No | ❌ No | ❌ No | orphaned |
gnu.net.local | GPL with Classpath exception | ❌ No | ❌ No | ❌ No | orphaned |
junixsocket is released under the Apache 2.0 License.
Commercial support is available through Kohlschütter Search Intelligence.