{"id":27963188,"url":"https://github.com/windmillcode/peerdart","last_synced_at":"2025-05-07T19:58:22.415Z","repository":{"id":242250996,"uuid":"806595350","full_name":"WindMillCode/peerdart","owner":"WindMillCode","description":"Peerjs Dart implementation","archived":false,"fork":false,"pushed_at":"2024-10-17T20:17:34.000Z","size":526,"stargazers_count":7,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-05-07T19:58:17.805Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Go","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/WindMillCode.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE","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},"funding":{"github":["windmillcode"],"patreon":"windmillcode","ko_fi":"windmillcode","open_collective":"windmill-code","community_bridge":"42056b04-305f-4e08-929c-66725181d6af","liberapay":"windmillcode","tidelift":"npm/windmillcode","polar":"windmillcode","thanks_dev":"windmillcode","custom":["https://www.gofundme.com/f/strengthen-our-business-to-take-on-bigger-initiati?utm_campaign=p_lico+share-sheet-first-launch\u0026utm_medium=copy_link\u0026utm_source=customer"]}},"created_at":"2024-05-27T13:53:23.000Z","updated_at":"2025-04-12T01:10:32.000Z","dependencies_parsed_at":"2024-06-06T21:13:46.297Z","dependency_job_id":"017197b6-578c-425c-852f-cb77ced16a31","html_url":"https://github.com/WindMillCode/peerdart","commit_stats":null,"previous_names":["windmillcode/peerdart"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/WindMillCode%2Fpeerdart","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/WindMillCode%2Fpeerdart/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/WindMillCode%2Fpeerdart/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/WindMillCode%2Fpeerdart/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/WindMillCode","download_url":"https://codeload.github.com/WindMillCode/peerdart/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252949274,"owners_count":21830150,"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":"2025-05-07T19:58:21.804Z","updated_at":"2025-05-07T19:58:22.409Z","avatar_url":"https://github.com/WindMillCode.png","language":"Go","funding_links":["https://github.com/sponsors/windmillcode","https://patreon.com/windmillcode","https://ko-fi.com/windmillcode","https://opencollective.com/windmill-code","https://funding.communitybridge.org/projects/42056b04-305f-4e08-929c-66725181d6af","https://liberapay.com/windmillcode","https://tidelift.com/funding/github/npm/windmillcode","https://polar.sh/windmillcode","https://thanks.dev/windmillcode","https://www.gofundme.com/f/strengthen-our-business-to-take-on-bigger-initiati?utm_campaign=p_lico+share-sheet-first-launch\u0026utm_medium=copy_link\u0026utm_source=customer"],"categories":[],"sub_categories":[],"readme":"# Windmillcode PeerDart: Simple peer-to-peer with WebRTC\n\nPeerDart provides a complete, configurable, and easy-to-use peer-to-peer API built on top of WebRTC, supporting both data channels and (planned) media streams.\n\nPeerDart **mirrors** the design of peerjs. Find the documentation [here](https://peerjs.com/docs).\n\n* supports socketio connections\n* sends chunks based on maxMessageSize from local and remote session descriptions\n\n\n## Status\n\n- [x] Alpha: Under heavy development\n- [x] Public Alpha: Ready for testing. But go easy on us, there will be bugs and missing functionality.\n- [x] Public Beta: Stable. No breaking changes expected in this version but possible bugs. (media is public alpha)\n- [ ] Public: Production-ready\n\n## Setup\n\n\n**Create a Peer**\n\n```dart\n\u003c!-- for development --\u003e\nfinal Peer peer = Peer(options:PeerOptions(\n      // debug: LogLevel.All,\n));\n\u003c!-- for production --\u003e\nfinal Peer peer = Peer(options:PeerOptions(\n      // debug: LogLevel.All,\n      clientType: \"socketio\",\n      host: \"[YOUR SERVER DOMAIN]\",\n      port: 9000,\n      secure: true));\n\n```\n\n## Data connections\n\n**Connect**\n\n```dart\nvar peer;\nif (peer?.id == null) {\n    peer = Peer(options: APPENV.peerdart);\n    wait peer!.init();\n}\n\nvar conn = webrtc.connect(res.data.result[\"sender_peer_id\"]);\nconn.on(\"open\",(data) async {\n    conn.send(\"hi!\");\n})\n```\n\n**Receive**\n\n```dart\nif (peer?.id == null) {\n    peer = Peer(options: APPENV.peerdart);\n    wait peer!.init();\n}\npeer!.on(\"connection\", (DataConnection? conn) {\n    conn?.on(\"data\", (dynamic data) async {\n        \u003c!-- work with your data --\u003e\n    })\n})\n```\n\n\n\n## Support\nWorks on android\n\n## Reference\n| Property        | Type                                                                      | Default Value                          | Description                                                                 |\n|-----------------|---------------------------------------------------------------------------|----------------------------------------|-----------------------------------------------------------------------------|\n| `debug`         | `LogLevel?`                                                               | `LogLevel.Disabled`                    | Log level for debugging.                                                    |\n| `host`          | `String?`                                                                 | `util.CLOUD_HOST`                      | Host address of the PeerServer.                                             |\n| `port`          | `int?`                                                                    | `util.CLOUD_PORT`                      | Port on which the PeerServer is running.                                    |\n| `path`          | `String?`                                                                 | `\"/\"`                                  | Path to the PeerServer.                                                     |\n| `key`           | `String?`                                                                 | `Peer.DEFAULT_KEY`                     | API key for the PeerServer.                                                 |\n| `token`         | `String?`                                                                 | `randomToken()`                        | Token used for authentication.                                              |\n| `config`        | `dynamic`                                                                 | `util.defaultConfig`                   | Configuration options for the RTC connection.                               |\n| `secure`        | `bool?`                                                                   | `true`                                 | Whether the connection should be secure (https/wss).                        |\n| `pingInterval`  | `int?`                                                                    | `null`                                 | Interval for sending ping messages to keep the connection alive.            |\n| `referrerPolicy`| `String?`                                                                 | `\"strict-origin-when-cross-origin\"`    | Referrer policy for the HTTP requests.                                      |\n| `clientType`    | `\"websocket\" \\| \"socketio\"`                                               | `\"websocket\"`                          | Type of client to use for the connection.                                   |\n| `logFunction`   | `void Function(LogLevel logLevel, dynamic args)?`                         | `null`                                 | Custom log function.                                                        |\n| `serializers`   | `Map\u003cString, DataConnection Function(String peerId, Peer provider, dynamic options)\u003e` | `{}`                                   | Custom serializers for different data connection types.                     |\n\n\n\n## Links\n\n### [Documentation / API Reference](https://peerjs.com/docs/)\n\n### [PeerServer](https://github.com/Judimax/peerjs-server/tree/PR-socketio-support)\n\n## License\n\nPeerDart is licensed under the [MIT License](./LICENSE).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwindmillcode%2Fpeerdart","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwindmillcode%2Fpeerdart","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwindmillcode%2Fpeerdart/lists"}