{"id":25305451,"url":"https://github.com/ipshipyard/js-node-datachannel","last_synced_at":"2025-10-05T15:48:36.465Z","repository":{"id":276755966,"uuid":"928983967","full_name":"ipshipyard/js-node-datachannel","owner":"ipshipyard","description":"A fork of node-datachannel with WebRTC-Direct patches applied","archived":false,"fork":false,"pushed_at":"2025-02-10T09:23:01.000Z","size":6883,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-02-10T09:25:31.828Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mpl-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ipshipyard.png","metadata":{"files":{"readme":"README.md","changelog":null,"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":{"open_collective":"node-datachannel"}},"created_at":"2025-02-07T15:43:50.000Z","updated_at":"2025-02-10T09:22:33.000Z","dependencies_parsed_at":"2025-02-10T09:35:41.081Z","dependency_job_id":null,"html_url":"https://github.com/ipshipyard/js-node-datachannel","commit_stats":null,"previous_names":["ipshipyard/js-node-datachannel"],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ipshipyard%2Fjs-node-datachannel","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ipshipyard%2Fjs-node-datachannel/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ipshipyard%2Fjs-node-datachannel/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ipshipyard%2Fjs-node-datachannel/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ipshipyard","download_url":"https://codeload.github.com/ipshipyard/js-node-datachannel/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":238264559,"owners_count":19443370,"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-02-13T09:27:40.544Z","updated_at":"2025-10-05T15:48:31.424Z","avatar_url":"https://github.com/ipshipyard.png","language":"C++","funding_links":["https://opencollective.com/node-datachannel"],"categories":[],"sub_categories":[],"readme":"\u003e This is a fork of `node-datachannel` with the changes from [#256](https://github.com/murat-dogan/node-datachannel/pull/256) applied\n\n# WebRTC For Node.js and Electron ( with WebSocket)\n\n![Linux CI Build](https://github.com/murat-dogan/node-datachannel/workflows/Build%20-%20Linux/badge.svg) ![Windows CI Build](https://github.com/murat-dogan/node-datachannel/workflows/Build%20-%20Win/badge.svg) ![Mac x64 CI Build](https://github.com/murat-dogan/node-datachannel/workflows/Build%20-%20Mac%20x64/badge.svg) ![Mac M1 CI Build](https://github.com/murat-dogan/node-datachannel/workflows/Build%20-%20Mac%20M1/badge.svg)\n\n-   Lightweight\n    -   No need to deal with WebRTC stack!\n    -   Small binary sizes (~8MB for Linux x64)\n-   Type infos for Typescript\n-   Integrated WebSocket Client \u0026 Server Implementation\n\nThis project is Node.js bindings for [libdatachannel](https://github.com/paullouisageneau/libdatachannel) library.\n\n## Install\n\n```sh\nnpm install node-datachannel\n```\n\n## Supported Platforms\n\n`node-datachannel` targets N-API version 8 and supports Node.js v18.20 and above. It is tested on Linux, Windows and MacOS. For N-API compatibility please check [here](https://nodejs.org/api/n-api.html#n_api_n_api_version_matrix).\n\n|                           | Linux [x64,armv7,arm64] (1) | Windows [x86,x64] | Mac [M1,x64] |\n| ------------------------- | :-------------------------: | :---------------: | :----------: |\n| N-API v8 (\u003e= Node.js v18) |              +              |         +         |      +       |\n\n**(1)** For Linux musl + libc\n\n## Electron\n\n`node-datachannel` supports Electron.\n\nPlease check [electron demo](/examples/electron-demo)\n\n## WebRTC Polyfills\n\nWebRTC polyfills to be used for libraries like `simple-peer`.\n\nPlease check [here for more](/src/polyfill)\n\n### web-platform-tests\n\nPlease check actual situation [here](/test/wpt-tests/)\n\n## WebSocket Client \u0026 Server\n\nIntegrated WebSocket Client \u0026 Server is available, which can be used separately or for signaling.\n\nFor an example usage, [check here](/examples/websocket)\n\n## Example Usage\n\n```js\nimport nodeDataChannel from 'node-datachannel';\n\n// Log Level\nnodeDataChannel.initLogger('Debug');\n\n// Integrated WebSocket available and can be used for signaling etc\n// const ws = new nodeDataChannel.WebSocket();\n\nlet dc1 = null;\nlet dc2 = null;\n\nlet peer1 = new nodeDataChannel.PeerConnection('Peer1', { iceServers: ['stun:stun.l.google.com:19302'] });\n\npeer1.onLocalDescription((sdp, type) =\u003e {\n    peer2.setRemoteDescription(sdp, type);\n});\npeer1.onLocalCandidate((candidate, mid) =\u003e {\n    peer2.addRemoteCandidate(candidate, mid);\n});\n\nlet peer2 = new nodeDataChannel.PeerConnection('Peer2', { iceServers: ['stun:stun.l.google.com:19302'] });\n\npeer2.onLocalDescription((sdp, type) =\u003e {\n    peer1.setRemoteDescription(sdp, type);\n});\npeer2.onLocalCandidate((candidate, mid) =\u003e {\n    peer1.addRemoteCandidate(candidate, mid);\n});\npeer2.onDataChannel((dc) =\u003e {\n    dc2 = dc;\n    dc2.onMessage((msg) =\u003e {\n        console.log('Peer2 Received Msg:', msg);\n    });\n    dc2.sendMessage('Hello From Peer2');\n});\n\ndc1 = peer1.createDataChannel('test');\n\ndc1.onOpen(() =\u003e {\n    dc1.sendMessage('Hello from Peer1');\n});\n\ndc1.onMessage((msg) =\u003e {\n    console.log('Peer1 Received Msg:', msg);\n});\n```\n\n## Examples\n\nPlease check [examples](/examples/) folder\n\n## Test\n\n```sh\nnpm run test                  # Unit tests\nnode test/connectivity.js     # Connectivity\n```\n\n## Build\n\nPlease check [here](/BULDING.md)\n\n## API Docs\n\nPlease check [docs](/API.md) page\n\n## Contributing\n\nContributions are welcome!\n\n## Thanks\n\nThanks to [Streamr](https://streamr.network/) for supporting this project by being a Sponsor!\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fipshipyard%2Fjs-node-datachannel","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fipshipyard%2Fjs-node-datachannel","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fipshipyard%2Fjs-node-datachannel/lists"}