From ec9854efe745dee5d76896d847bdb4291ea83920 Mon Sep 17 00:00:00 2001 From: birme Date: Mon, 22 Jun 2020 13:04:15 +0200 Subject: [PATCH] Updated readable example with caller mode --- README.md | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 89eb97f..81680b3 100644 --- a/README.md +++ b/README.md @@ -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.