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;
};