{"id":18440267,"url":"https://github.com/drowzy/ex_wss","last_synced_at":"2025-07-08T04:34:40.125Z","repository":{"id":68391861,"uuid":"80955880","full_name":"drowzy/ex_wss","owner":"drowzy","description":"Elixir websocket server","archived":false,"fork":false,"pushed_at":"2017-02-16T15:09:26.000Z","size":11,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-02-16T11:14:09.845Z","etag":null,"topics":["cowboy","elixir","websocket"],"latest_commit_sha":null,"homepage":null,"language":"Elixir","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/drowzy.png","metadata":{"files":{"readme":"README.md","changelog":null,"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}},"created_at":"2017-02-04T23:34:45.000Z","updated_at":"2024-12-17T06:15:32.000Z","dependencies_parsed_at":null,"dependency_job_id":"8fe59011-3128-4305-9ec3-89d4254311a4","html_url":"https://github.com/drowzy/ex_wss","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/drowzy%2Fex_wss","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/drowzy%2Fex_wss/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/drowzy%2Fex_wss/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/drowzy%2Fex_wss/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/drowzy","download_url":"https://codeload.github.com/drowzy/ex_wss/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248905564,"owners_count":21181011,"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":["cowboy","elixir","websocket"],"created_at":"2024-11-06T06:29:15.485Z","updated_at":"2025-04-14T15:26:57.422Z","avatar_url":"https://github.com/drowzy.png","language":"Elixir","funding_links":[],"categories":[],"sub_categories":[],"readme":"# ExWss\n\nElixir Websocket server using, plug and cowboy.\n\nBuilt because I wanted hands on experience implementing a websocket server in Elixir\nwithout using Phoenix.\n\n## Installation\nRequires Elixir \u003e= 1.4.0\n\n```bash\ngit clone https://github.com/drowzy/ex_wss\n\n```\n\n## Usage\n\nRun with:\n\n```bash\niex -S mix\n```\n\nThe HTTP server is listening on port 4444 by default. The websocket endpoint is located at ws://localhost:4444/ws\nConnected clients are closed if inactive longer than 60s. This can be changed in `config/config.exs` together with `port` and `ws_endpoint`.\n\nThis implementation specifies a simple pubsub protocol where the client can subscribe to a topic and broadcast messages to a topic.\n\n### Subscribing\n\nA subscription to a topic can be done by sending a message on the form:\n\n```json\n{\n  \"type\": \"subscribe\",\n  \"topic\": \"foo.bar\"\n}\n```\nThe message is either acked or nacked depending on outcome. Trying to subscribe to the same topic twice will result in a nack the second time.\n\n### Publishing\nA Publish is done by sending:\n\n```json\n{\n  \"type\": \"publish\",\n  \"topic\": \"foo.bar\",\n  \"payload\": \"baz\"\n}\n```\n\nThe message will be broadcasted to all subscribers on the topic, the request will always be acked.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdrowzy%2Fex_wss","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdrowzy%2Fex_wss","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdrowzy%2Fex_wss/lists"}