HyperswarmTransport
@totemsdk/lookup-node / HyperswarmTransport
Class: HyperswarmTransport
Adapts a Node.js Duplex stream (Hyperswarm connection) to the ITransport interface used by ClientSession. Buffers binary frames and emits 'data' events with raw Uint8Array chunks.
Implements
Constructors
Constructor
new HyperswarmTransport(
_stream):HyperswarmTransport
Parameters
_stream
Duplex
Returns
HyperswarmTransport
Methods
close()
close():
void
Returns
void
Implementation of
on()
Call Signature
on(
event,handler):void
Parameters
event
"data"
handler
(chunk) => void
Returns
void
Implementation of
Call Signature
on(
event,handler):void
Parameters
event
"close"
handler
() => void
Returns
void
Implementation of
Call Signature
on(
event,handler):void
Parameters
event
"error"
handler
(err) => void
Returns
void
Implementation of
send()
send(
data):void
Parameters
data
Uint8Array
Returns
void