@intention-network/message-parser
v0.0.4
Published
Message parser for intention network
Downloads
2
Readme
Intention network Stream
This is a class for Intention network for sending or receiving large data It sending or receiving by chunks
Usage
import Stream from '@intention-network/stream';
const channel = .. //This can be WebSocket or webRTC or any stream with send and onmessage methods
const stream = Stream.from(channel);
Sending large data
await stream.send(data);
receiving large data
await stream.onmessage = (event) => {
event.data // large data here;
};