{"id":16476002,"url":"https://github.com/softprops/tubesocks","last_synced_at":"2025-07-23T11:04:57.729Z","repository":{"id":3665456,"uuid":"4734275","full_name":"softprops/tubesocks","owner":"softprops","description":"A comfortable and fashionable way to have bi-directional conversations with modern web servers.","archived":false,"fork":false,"pushed_at":"2016-11-03T03:21:19.000Z","size":28,"stargazers_count":14,"open_issues_count":2,"forks_count":2,"subscribers_count":5,"default_branch":"master","last_synced_at":"2025-07-19T05:55:31.147Z","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":"2012-06-21T03:19:16.000Z","updated_at":"2020-09-02T06:49:30.000Z","dependencies_parsed_at":"2022-08-24T17:50:21.438Z","dependency_job_id":null,"html_url":"https://github.com/softprops/tubesocks","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/softprops/tubesocks","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/softprops%2Ftubesocks","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/softprops%2Ftubesocks/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/softprops%2Ftubesocks/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/softprops%2Ftubesocks/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/softprops","download_url":"https://codeload.github.com/softprops/tubesocks/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/softprops%2Ftubesocks/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":266665781,"owners_count":23964972,"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-07-23T02:00:09.312Z","response_time":66,"last_error":null,"robots_txt_status":null,"robots_txt_updated_at":null,"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:41:13.868Z","updated_at":"2025-07-23T11:04:57.698Z","avatar_url":"https://github.com/softprops.png","language":"Scala","funding_links":[],"categories":["HTTP"],"sub_categories":[],"readme":"# tubesocks\n\n[![Build Status](https://travis-ci.org/softprops/tubesocks.svg?branch=master)](https://travis-ci.org/softprops/tubesocks)\n\nA comfortable _and_ fashionable way to have bi-directional conversations with modern web servers.\n\nTubesocks is a snug little interface that wraps [async http client][ahc] which supports an emerging standard protocol for pushing\nmessages to clients and responding over an open connection.\n\nHere is an `echo` client.\n\n```scala\nimport tubesocks._\nSock.uri(\"ws://host\") {\n  case Message(m, s) =\u003e s.send(m)\n}\n```\n\n## install\n\n### sbt\n\nBy hand (cut \u0026 paste)\n\n```scala\nlibraryDependencies += \"me.lessis\" %% \"tubesocks\" % \"0.1.0\"\n```\n\nThe [civilized way](https://github.com/softprops/ls#readme)\n\n    ls-install tubesocks\n\n## usage\n\n```scala\nimport tubesocks._\nSock.uri(\"ws://host.com\") {\n  case Open(s) =\u003e s.send(\"I'm here\")\n  case Message(t, s) =\u003e println(\"server says %s\" format t)\n  case Close(s) =\u003e println(\"we're done\")\n}\n```\n\nDo you prefer configuring your own transmission?\n\n```scala\nimport tubesocks._\nSock.configure({ b =\u003e\n  b.setWebSocketIdleTimeoutInMs(2 * 60 * 1000)\n})(new URI(\"ws://host.com\")) {\n  case Message(t, s) =\u003e s.send(\"thanks for the message\")\n}\n```\n\nDoug Tangren (softprops) 2012-2013\n\n[ahc]: https://github.com/sonatype/async-http-client\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsoftprops%2Ftubesocks","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsoftprops%2Ftubesocks","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsoftprops%2Ftubesocks/lists"}