@libp2p/webrtc 1.1.5 → 1.1.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -75,30 +75,10 @@ Examples can be found in the [examples folder](examples/README.md).
75
75
 
76
76
  ![https://github.com/libp2p/js-libp2p-interfaces/tree/master/packages/interface-transport](https://raw.githubusercontent.com/libp2p/js-libp2p-interfaces/master/packages/interface-transport/img/badge.png)
77
77
 
78
- Browsers can only `dial`, so `listen` is not supported.
79
-
80
- ```js
81
- interface Transport {
82
- [Symbol.toStringTag]: string
83
- [symbol]: true
84
- dial: (ma: Multiaddr, options: DialOptions) => Promise<Connection>
85
- createListener: (options: CreateListenerOptions) => Listener
86
- filter: MultiaddrFilter
87
- }
88
-
89
- class WebRTCTransport implements Transport {
90
-
91
- async dial (ma: Multiaddr, options: WebRTCDialOptions): Promise<Connection> {
92
- const rawConn = await this._connect(ma, options)
93
- log(`dialing address - ${ma.toString()}`)
94
- return rawConn
95
- }
96
-
97
- createListener (options: CreateListenerOptions): Listener {
98
- throw unimplemented('WebRTCTransport.createListener')
99
- }
100
- }
101
- ```
78
+ Browsers can usually only `dial`, but `listen` is supported in the WebRTC
79
+ transport when paired with another listener like CircuitV2, where you listen on
80
+ a relayed connection. Take a look at [index.js](examples/browser-to-browser/index.js) for
81
+ an example.
102
82
 
103
83
  ### Connection
104
84