{"id":16037272,"url":"https://github.com/stevenroose/dart-websockets","last_synced_at":"2025-03-18T04:30:35.873Z","repository":{"id":33805441,"uuid":"37499859","full_name":"stevenroose/dart-websockets","owner":"stevenroose","description":"A generic WebSocket package for Dart","archived":false,"fork":false,"pushed_at":"2016-10-16T17:06:45.000Z","size":45,"stargazers_count":11,"open_issues_count":4,"forks_count":3,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-02-28T06:57:40.830Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Dart","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/stevenroose.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","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":"2015-06-16T01:03:32.000Z","updated_at":"2023-03-01T01:07:54.000Z","dependencies_parsed_at":"2022-08-17T19:35:18.140Z","dependency_job_id":null,"html_url":"https://github.com/stevenroose/dart-websockets","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/stevenroose%2Fdart-websockets","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stevenroose%2Fdart-websockets/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stevenroose%2Fdart-websockets/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stevenroose%2Fdart-websockets/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/stevenroose","download_url":"https://codeload.github.com/stevenroose/dart-websockets/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243902293,"owners_count":20366259,"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":[],"created_at":"2024-10-08T22:12:01.261Z","updated_at":"2025-03-18T04:30:35.586Z","avatar_url":"https://github.com/stevenroose.png","language":"Dart","funding_links":[],"categories":[],"sub_categories":[],"readme":"# websockets\n\nA platform-independent WebSocket library using the Dart async API.\n\nThis library defines a WebSocket interface very much like the one in `dart:io` that can be used when writing\nplatform-independent packages like API-wrappers.\n\n\n## Documentation\n\nThe documentation for this library can be found [on DartDocs](https://www.dartdocs.org/documentation/websockets/0.2.1/).\n\n## Usage\n\nCreating and using WebSockets with this library is easy, it works entirely the same as how the dart:io.WebSocket\nclass works:\n\n```dart\nimport \"dart:io\";\nimport \"package:websockets/websockets.dart\";\n\nmain() async {\n  WebSocket ws = await WebSocket.connect(\"wss://echo.websocket.org\");\n  ws.listen(print);\n  ws.add(\"test\");\n}\n```\n\n### When developing platform-independent packages\n\nEverything stays the same. The websockets import does not import `dart:io` or `dart:html`, so your code will run\non both platforms. One thing to remember is that the user of your library has to make an explicit import of either of\n`dart:io` or `dart:html`.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstevenroose%2Fdart-websockets","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fstevenroose%2Fdart-websockets","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstevenroose%2Fdart-websockets/lists"}