ApiCoreInterfaces
Interface: SignalledTransport
Defined in: packages/core/src/network/transport.ts:45
A transport whose connections start with an offer and an answer. Each carries its ICE candidates inside it, gathered before it is handed over, so a connection takes one message each way and nothing trickles after.
Extends
Properties
| Property | Modifier | Type | Description | Inherited from | Defined in |
|---|---|---|---|---|---|
binding? | readonly | (peerId) => | { local: string; remote: string; } | null | The certificates of one open connection's two ends, for binding the peer handshake to it (peer-auth.ts). Absent where the connection has none. | PeerTransport.binding | packages/core/src/network/transport.ts:37 |
close | readonly | (peerId) => void | - | PeerTransport.close | packages/core/src/network/transport.ts:28 |
closeAll | readonly | () => void | Closes every connection. Deliberate: a transport must not reconnect after it. | PeerTransport.closeAll | packages/core/src/network/transport.ts:30 |
connect? | readonly | () => Promise<void> | Starts dialling, for a transport that reaches out on its own. Called by the network manager's connect(). A signalled transport has nothing to start — its connections begin with an offer. | PeerTransport.connect | packages/core/src/network/transport.ts:26 |
createOffer | readonly | (peerId) => Promise<RTCSessionDescriptionInit> | Opens a connection and returns the offer to carry to the peer. | - | packages/core/src/network/transport.ts:47 |
handleAnswer | readonly | (peerId, answer) => Promise<void> | - | - | packages/core/src/network/transport.ts:53 |
handleOffer | readonly | (peerId, offer) => Promise<RTCSessionDescriptionInit> | Accepts a peer's offer and returns the answer to carry back. | - | packages/core/src/network/transport.ts:49 |
off | readonly | <K>(event, callback) => void | - | PeerTransport.off | packages/core/src/network/transport.ts:32 |
on | readonly | <K>(event, callback) => void | - | PeerTransport.on | packages/core/src/network/transport.ts:31 |
send | readonly | (peerId, data) => void | - | PeerTransport.send | packages/core/src/network/transport.ts:27 |