{"id":13741370,"url":"https://github.com/lpil/mug","last_synced_at":"2026-02-19T01:02:12.959Z","repository":{"id":199091228,"uuid":"702126352","full_name":"lpil/mug","owner":"lpil","description":"🍺 A TCP client for Gleam!","archived":false,"fork":false,"pushed_at":"2025-09-09T10:14:17.000Z","size":27,"stargazers_count":28,"open_issues_count":4,"forks_count":8,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-09-22T22:27:59.516Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Gleam","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/lpil.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2023-10-08T15:15:47.000Z","updated_at":"2025-09-09T10:11:35.000Z","dependencies_parsed_at":"2024-02-29T13:10:42.537Z","dependency_job_id":"0c7508fd-8bc4-48c3-a00b-f1558d684ada","html_url":"https://github.com/lpil/mug","commit_stats":null,"previous_names":["lpil/mug"],"tags_count":9,"template":false,"template_full_name":null,"purl":"pkg:github/lpil/mug","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lpil%2Fmug","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lpil%2Fmug/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lpil%2Fmug/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lpil%2Fmug/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/lpil","download_url":"https://codeload.github.com/lpil/mug/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lpil%2Fmug/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29600352,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-19T00:59:38.239Z","status":"ssl_error","status_checked_at":"2026-02-19T00:59:36.936Z","response_time":162,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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-08-03T04:00:58.377Z","updated_at":"2026-02-19T01:02:12.945Z","avatar_url":"https://github.com/lpil.png","language":"Gleam","funding_links":[],"categories":["Packages"],"sub_categories":["Networking"],"readme":"# mug 🍺\n\n[![Package Version](https://img.shields.io/hexpm/v/mug)](https://hex.pm/packages/mug)\n[![Hex Docs](https://img.shields.io/badge/hex-docs-ffaff3)](https://hexdocs.pm/mug/)\n\nA TCP client for Gleam!\n\n```sh\ngleam add mug@3\n```\n\n```gleam\nimport mug\n\npub fn main() {\n  // Form a connection to a TCP server\n  let assert Ok(socket) =\n    mug.new(\"erlang-the-movie.example.com\", port: 12345)\n    |\u003e mug.timeout(milliseconds: 500)\n    |\u003e mug.connect()\n\n  // Send a packet to the server\n  assert mug.send(socket, \u003c\u003c\"Hello, Joe!\\n\":utf8\u003e\u003e) == Ok(Nil)\n\n  // Receive a packet back\n  let assert Ok(packet) = mug.receive(socket, timeout_milliseconds: 100)\n  \n  packet\n  // -\u003e \u003c\u003c\"Hello, Mike!\":utf8\u003e\u003e\n}\n```\n\nIt also includes support for receiving packages as Erlang messages, enabling\nTCP sockets to be used within OTP actors.\n\nDocumentation can be found at \u003chttps://hexdocs.pm/mug\u003e.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flpil%2Fmug","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flpil%2Fmug","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flpil%2Fmug/lists"}