MCPcopy
hub / github.com/feross/simple-peer / send

Method send

index.js:246–250  ·  view source on GitHub ↗

* Send text/binary data to the remote peer. * @param {ArrayBufferView|ArrayBuffer|Buffer|string|Blob} chunk

(chunk)

Source from the content-addressed store, hash-verified

244 * @param {ArrayBufferView|ArrayBuffer|Buffer|string|Blob} chunk
245 */
246 send (chunk) {
247 if (this.destroying) return
248 if (this.destroyed) throw errCode(new Error('cannot send after peer is destroyed'), 'ERR_DESTROYED')
249 this._channel.send(chunk)
250 }
251
252 /**
253 * Add a Transceiver to the connection.

Callers 10

_writeMethod · 0.95
findCandidatePairMethod · 0.95
tryTestFunction · 0.45
tryTestFunction · 0.45
tryTestFunction · 0.45
tryTestFunction · 0.45
onMessageFunction · 0.45
onMessageFunction · 0.45
server.jsFile · 0.45
onMessageFunction · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected