Updated readable example with caller mode

This commit is contained in:
birme 2020-06-22 13:04:15 +02:00
parent a93211894d
commit ec9854efe7

View file

@ -44,7 +44,7 @@ class SRT {
```
### Readable Stream
A custom readable stream API is also available, example:
A custom readable stream API is also available, example (in listener mode):
```
const fs = require('fs');
@ -57,6 +57,15 @@ srt.listen(readStream => {
});
```
of in caller mode:
```
const srt = new SRTReadStream('127.0.0.1', 1234);
srt.connect(readStream => {
readStream.pipe(dest);
});
```
## [Contributing](CONTRIBUTING.md)
In addition to contributing code, you can help to triage issues. This can include reproducing bug reports, or asking for vital information such as version numbers or reproduction instructions.