This repository has been archived by the owner on Apr 24, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 19
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
BREAKING CHANGE: Switch to using async/await and async iterators. The transport and connection interfaces have changed.
- Loading branch information
1 parent
7309e3e
commit 2bf44b5
Showing
12 changed files
with
330 additions
and
216 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
'use strict' | ||
|
||
const { Adapter } = require('interface-transport') | ||
const withIs = require('class-is') | ||
const WebRTCDirect = require('.') | ||
|
||
// Legacy adapter to old transport & connection interface | ||
class WebRTCDirectAdapter extends Adapter { | ||
constructor () { | ||
super(new WebRTCDirect()) | ||
} | ||
} | ||
|
||
module.exports = withIs(WebRTCDirectAdapter, { | ||
className: 'WebRTCDirect', | ||
symbolName: '@libp2p/js-libp2p-webrtc-direct/webrtcdirect' | ||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
'use strict' | ||
|
||
// Time to wait for a connection to close gracefully before destroying it | ||
// manually | ||
module.exports.CLOSE_TIMEOUT = 2000 |
Oops, something went wrong.