{"id":16476373,"url":"https://github.com/softprops/unisockets","last_synced_at":"2025-08-29T17:37:59.701Z","repository":{"id":22751163,"uuid":"26096589","full_name":"softprops/unisockets","owner":"softprops","description":"unix domain sockets that look just like tcp sockets","archived":false,"fork":false,"pushed_at":"2018-06-21T17:32:02.000Z","size":560,"stargazers_count":11,"open_issues_count":3,"forks_count":2,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-08-25T02:41:09.798Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Scala","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/softprops.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":null,"support":null}},"created_at":"2014-11-02T23:33:20.000Z","updated_at":"2019-01-18T12:25:19.000Z","dependencies_parsed_at":"2022-07-27T03:32:06.471Z","dependency_job_id":null,"html_url":"https://github.com/softprops/unisockets","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/softprops/unisockets","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/softprops%2Funisockets","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/softprops%2Funisockets/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/softprops%2Funisockets/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/softprops%2Funisockets/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/softprops","download_url":"https://codeload.github.com/softprops/unisockets/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/softprops%2Funisockets/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":272733231,"owners_count":24984260,"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","status":"online","status_checked_at":"2025-08-29T02:00:10.610Z","response_time":87,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":[],"created_at":"2024-10-11T12:42:15.588Z","updated_at":"2025-08-29T17:37:59.669Z","avatar_url":"https://github.com/softprops.png","language":"Scala","funding_links":[],"categories":[],"sub_categories":[],"readme":"# unisockets\n\n\u003e dressing up [unix domain sockets](http://en.wikipedia.org/wiki/Unix_domain_socket) in a tcp [socket](http://docs.oracle.com/javase/7/docs/api/java/nio/channels/SocketChannel.html) shirt and tie.\n\n\u003cp\u003e\n  \u003cimg height=\"175\" src=\"https://rawgit.com/softprops/unisockets/master/us.svg\"/\u003e\n\u003c/p\u003e\n\n## install\n\nAdd the following to your ivy resolver chain\n\n```scala\nresolvers += \"softprops-maven\" at \"http://dl.bintray.com/content/softprops/maven\"\n```\n\n### core\n\nAdd the following to your sbt build definition to add core interfaces to your classpath.\n\n```scala\nlibraryDependencies += \"me.lessis\" %% \"unisockets-core\" % \"0.1.0\"\n```\n\n### netty\n\nAdd the following to your sbt build definition to add netty3 bindings to your classpath.\n\n```scala\nlibraryDependencies += \"me.lessis\" %% \"unisockets-netty\" % \"0.1.0\"\n```\n\n## usage\n\n_note_: This library requires at a minimum a java 7 jre, as the [SocketChannel](http://docs.oracle.com/javase/7/docs/api/java/nio/channels/SocketChannel.html) class changed to implement a new [NetworkChannel](http://docs.oracle.com/javase/7/docs/api/java/nio/channels/NetworkChannel.html) interface in java 7.\n\nA Unix domain socket facilitates inter-process communication between different processes on a host machine via data streamed through a local file descriptor.\n\nUnisockets, like tcp sockets, need to be addressable. unisockets defines an implementation of a `SocketAddress` for these file descriptors called an `Addr`.\n\n```scala\nimport java.io.File\nval addr = unisockets.Addr(new File(\"/var/run/unix.sock\"))\n```\n\nYou can get the path of the file an `Addr` refers to by invoking `Addr#getHostName`.\n\nWith an `Addr`, you can create instances of both nio SocketChannels\n\n```scala\nval channel = unisockets.SocketChannel.open(addr)\n```\n\nand old io Sockets.\n\n```scala\nval socket = unisockets.Socket.open(addr)\n```\n\nYou can also create disconnected instances of each calling `open` without arguments and calling `connect(addr)` at a deferred time. This library aims to stay close to familiar factory methods defined in their [std lib counterparts](http://docs.oracle.com/javase/7/docs/api/java/nio/channels/SocketChannel.html#open())\n\n### netty\n\nThe `unisockets-netty` module provides a [Netty](http://netty.io/) `NioSocketChannel` backed by a `unisockets.SocketChannel`, enabling you to\nbuild netty clients for UNIX domain socket servers.\n\n```scala \nval sockets = new unisockets.ClientUdsSocketChannelFactory()\n```\n\nThis nio socket channel factory share's many similarities with [NioClientSocketChannelFactories](http://netty.io/3.10/api/org/jboss/netty/channel/socket/nio/NioClientSocketChannelFactory.html)\n\nIt's constructor takes an optional Executor for accepting connections, an optional Executor for handling requests, and an optional Timer for task scheduling.\n\nClient's using this interface should make sure they call `ClientUdsSocketChannelFactory#releaseExternalResources` to release any resources \nacquired during request processing.\n\nnote: The Netty interface has only been tested with a Netty client pipeline with version `3.9.6.Final` newer versions ( Netty 4+ ) are not supported yet but support is planned to be added in the future.\n\nDoug Tangren (softprops) 2014-2015\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsoftprops%2Funisockets","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsoftprops%2Funisockets","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsoftprops%2Funisockets/lists"}