{"id":15295130,"url":"https://github.com/kohlschutter/junixsocket","last_synced_at":"2025-05-14T00:08:32.434Z","repository":{"id":23692323,"uuid":"27064201","full_name":"kohlschutter/junixsocket","owner":"kohlschutter","description":"Unix Domain Sockets for all Java versions 7 and newer (AF_UNIX), AF_TIPC, AF_VSOCK, and more","archived":false,"fork":false,"pushed_at":"2025-04-10T17:59:22.000Z","size":37816,"stargazers_count":449,"open_issues_count":3,"forks_count":116,"subscribers_count":21,"default_branch":"main","last_synced_at":"2025-05-09T18:54:47.739Z","etag":null,"topics":["af-unix","bsd-sockets","crosscompile","inter-process-communication","ipc","java","java-sockets-api","jni","jni-library","junixsocket","mysql","postgresql","rmi","socket","sockets","tipc","unix-domain-socket","vsock"],"latest_commit_sha":null,"homepage":"","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/kohlschutter.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":"AUTHORS","dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2014-11-24T06:41:49.000Z","updated_at":"2025-04-30T21:50:20.000Z","dependencies_parsed_at":"2024-02-20T14:44:40.964Z","dependency_job_id":"ed63af56-9dc7-406c-900d-6a7269c78dee","html_url":"https://github.com/kohlschutter/junixsocket","commit_stats":null,"previous_names":[],"tags_count":34,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kohlschutter%2Fjunixsocket","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kohlschutter%2Fjunixsocket/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kohlschutter%2Fjunixsocket/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kohlschutter%2Fjunixsocket/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/kohlschutter","download_url":"https://codeload.github.com/kohlschutter/junixsocket/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253360619,"owners_count":21896370,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["af-unix","bsd-sockets","crosscompile","inter-process-communication","ipc","java","java-sockets-api","jni","jni-library","junixsocket","mysql","postgresql","rmi","socket","sockets","tipc","unix-domain-socket","vsock"],"created_at":"2024-09-30T17:08:43.015Z","updated_at":"2025-05-14T00:08:27.423Z","avatar_url":"https://github.com/kohlschutter.png","language":"Java","readme":"![junixsocket logo](https://user-images.githubusercontent.com/822690/246675372-d1775152-5f5e-4576-8f3d-8445779ea584.png)\n\n[![GitHub Workflow Status (with event)](https://img.shields.io/github/actions/workflow/status/kohlschutter/junixsocket/codeql-analysis.yml?cacheSeconds=60)](https://github.com/kohlschutter/junixsocket/actions/workflows/codeql-analysis.yml) [![Last commit on main](https://img.shields.io/github/last-commit/kohlschutter/junixsocket/main)](https://github.com/kohlschutter/junixsocket/commits/main) [![Maven Central version](https://img.shields.io/maven-central/v/com.kohlschutter.junixsocket/junixsocket)](https://search.maven.org/artifact/com.kohlschutter.junixsocket/junixsocket) [![Apache 2.0 Licensed](https://img.shields.io/github/license/kohlschutter/junixsocket)](https://github.com/kohlschutter/junixsocket/blob/main/NOTICE)\n\n**Users of junixsocket are strongly advised to upgrade to version 2.10.1 or newer ([changelog](https://kohlschutter.github.io/junixsocket/changelog.html))**\n\n# junixsocket\n\njunixsocket is a Java/JNI library that allows the use of\n[Unix Domain Sockets](https://en.wikipedia.org/wiki/Unix_domain_socket) (AF_UNIX sockets), and\nother address/protocol families (such as [AF_TIPC](http://tipc.io/), AF_VSOCK, and AF_SYSTEM),\nfrom Java.\n\n## Unix sockets API, in Java, AF.\n\n* *junixsocket* is the most complete implementation of AF_UNIX sockets for the Java ecosystem.\n* Supports other socket types, such as TIPC (on Linux), VSOCK (on Linux, and certain macOS VMs), and\n  AF_SYSTEM (on macOS) as well!\n* Comes with pre-built native libraries for most operating systems and platforms, including\n  macOS, Linux, Android, Windows, Solaris, FreeBSD, NetBSD, OpenBSD, DragonFlyBSD, AIX, IBM i.\n* Additionally, you can build and run junixsocket natively on IBM z/OS (experimental).\n* Supports all Java versions since Java 8* (with common AF_UNIX support available for Java 7 and newer)\n* Supports both the Java Socket API and NIO (`java.net.Socket`, `java.net.SocketChannel`, etc.)\n* Supports streams and datagrams.\n* Supports Remote Method Invocation (RMI) over AF_UNIX.\n* Supports JDBC database connectors (connect to a local database server via Unix sockets).\n    * Generic *AFUNIXSocketFactory* for databases like PostgreSQL\n    * Custom socket factory for MySQL Connector/J, as [recommended by Oracle](https://dev.mysql.com/doc/connector-j/8.0/en/connector-j-unix-socket.html)\n* Supports [peer credentials](https://kohlschutter.github.io/junixsocket/peercreds.html).\n* Supports sending and receiving [file descriptors](https://kohlschutter.github.io/junixsocket/filedescriptors.html).\n* Supports the abstract namespace on Linux.\n* Supports socketpair, and instantiating socket classes from file descriptors.\n* Supports [HTTP over UNIX sockets](https://kohlschutter.github.io/junixsocket/http.html) (using [NanoHTTPD](https://github.com/NanoHttpd/nanohttpd), [OkHttp](https://github.com/square/okhttp), and [jetty](https://github.com/eclipse/jetty.project/)).\n* Supports JPMS/Jigsaw modules. The project is modularized so you can install only what you need.\n* Supports GraalVM native-image AOT/ahead-of-time compilation (since 2.6.0)\n* Provides a selftest package with 300+ tests to ensure compatibility with any target platform.\n* No outside dependencies are necessary at runtime.\n* Apache 2.0 licensed.\n\n`*` (Tested up to Java 24; basic support for Java 7 was dropped in version 2.5.0 and reintroduced in version 2.8.0).\n\n## Quick links\n\n * [Project website](https://kohlschutter.github.io/junixsocket/) and [Github project](https://github.com/kohlschutter/junixsocket/)\n * [Changelog](https://kohlschutter.github.io/junixsocket/changelog.html)\n * [Getting started](https://kohlschutter.github.io/junixsocket/quickstart.html)\n * [Demo code](https://kohlschutter.github.io/junixsocket/demo.html) ([Java source](https://kohlschutter.github.io/junixsocket/junixsocket-demo/xref/index.html))\n    - Sockets (`org.newsclub.net.unix.demo`)\n    - RMI over Unix Sockets (`org.newsclub.net.unix.demo.rmi` and `org.newsclub.net.unix.demo.rmi.services`)\n    - MySQL over Unix Sockets (`org.newsclub.net.mysql.demo`)\n    - Postgres over Unix Sockets (`org.newsclub.net.unix.demo.jdbc`)\n    - Apache Mina (`org.newsclub.net.unix.demo.mina`)\n    - NanoHttpd (`org.newsclub.net.unix.demo.nanohttpd`)\n    - Netty (`org.newsclub.net.unix.demo.netty`)\n    - OkHttp (`org.newsclub.net.unix.demo.okhttp`)\n    - SSL (`org.newsclub.net.unix.demo.ssl`)\n  * [API Javadocs](https://kohlschutter.github.io/junixsocket/apidocs/)\n  * [Unix Domain Socket Reference](https://kohlschutter.github.io/junixsocket/unixsockets.html)\n  * [TIPC documentation](https://kohlschutter.github.io/junixsocket/junixsocket-tipc/index.html)\n  * [VSOCK documentation](https://kohlschutter.github.io/junixsocket/junixsocket-vsock/index.html)\n  * [AF_SYSTEM documentation](https://kohlschutter.github.io/junixsocket/junixsocket-darwin/index.html)\n\n## Licensing\n\njunixsocket is released under the Apache 2.0 License.\n\nCommercial support is available through [Kohlschütter Search Intelligence](http://www.kohlschutter.com/).\n\n## Self-test\n\nTo verify that the software works as expected on your platform, you can run the\n[junixsocket-selftest](https://kohlschutter.github.io/junixsocket/selftest.html) program, which is\nlocated in the \"junixsocket-dist\" distribution package, and also released on GitHub.\n\n```\njava -jar junixsocket-selftest-VERSION-jar-with-dependencies.jar\n```\n\n(with VERSION being the corresponding junixsocket version).\n\n## Maven dependency\n\nTo include the core junixsocket functionality in your project, add the following Maven dependency\n\n\u003e **NOTE** Since version 2.4.0, `junixsocket-core` is POM-only (that's why you need to specify\n`\u003ctype\u003epom\u003c/type\u003e`)\n\n```\n\u003cdependency\u003e\n  \u003cgroupId\u003ecom.kohlschutter.junixsocket\u003c/groupId\u003e\n  \u003cartifactId\u003ejunixsocket-core\u003c/artifactId\u003e\n  \u003cversion\u003e2.10.1\u003c/version\u003e\n  \u003ctype\u003epom\u003c/type\u003e\n\u003c/dependency\u003e\n```\n\nWhile you should definitely pin your dependency to a specific version, you are very much encouraged\nto keep updating to the most recent version. Check back frequently.\n\nFor more, optional packages (RMI, MySQL, Jetty, TIPC, VSOCK, server, Darwin, SSL, GraalVM, etc.) and\nGradle instructions see [here](https://kohlschutter.github.io/junixsocket/dependency.html)\n\n## Snapshot builds for testing\n\nWhen you're testing a `-SNAPSHOT` version, make sure that the Sonatype snapshot repository is\nenabled in your POM:\n\n```\n\u003crepositories\u003e\n    \u003crepository\u003e\n        \u003cid\u003esonatype.snapshots\u003c/id\u003e\n        \u003cname\u003eSonatype snapshot repository\u003c/name\u003e\n        \u003curl\u003ehttps://oss.sonatype.org/content/repositories/snapshots/\u003c/url\u003e\n        \u003clayout\u003edefault\u003c/layout\u003e\n        \u003csnapshots\u003e\n            \u003cenabled\u003etrue\u003c/enabled\u003e\n        \u003c/snapshots\u003e\n    \u003c/repository\u003e\n\u003c/repositories\u003e\n```\n\nTo update to the latest SNAPSHOT (which is currently not being built for every commit),\nrun the following command from within your own project:\n\n```\nmvn -U dependency:resolve\n```\n\nor (for Gradle)\n\n```\n./gradlew refreshVersions\n```\n","funding_links":[],"categories":["网络编程","Java"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkohlschutter%2Fjunixsocket","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkohlschutter%2Fjunixsocket","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkohlschutter%2Fjunixsocket/lists"}