stream: function() support doesn't work as documented.
See original GitHub issueThe docs say that the function is async and should call a callback upon creation of the stream.
stream: function (cb) {
const newStream = new SocksConnection({host: 'remote.host', port: 3306}, {host: 'localhost', port: 1080});
cb(null, newStream);
}
The code says the function is synchronous and should return the stream.
// if stream is a function, treat it as "stream agent / factory"
if (typeof opts.config.stream == 'function') {
this.stream = opts.config.stream(opts);
} else {
Issue Analytics
- State:
- Created 4 years ago
- Reactions:1
- Comments:7 (5 by maintainers)
Top Results From Across the Web
Tutorial - Run Azure Functions in Azure Stream Analytics jobs
In this tutorial, you learn how to configure Azure Functions as an output sink to Stream Analytics jobs.
Read more >Asynchronous programming: Streams | Dart
What's the point? Streams provide an asynchronous sequence of data. Data sequences include user-generated events and data read from files.
Read more >Stream | Node.js v19.3.0 Documentation
A stream is an abstract interface for working with streaming data in Node.js. ... If the consumer of the Stream does not call...
Read more >Analyze Java Stream operations | IntelliJ IDEA Documentation
Suspend the program at a line where the stream is used. You can use any stream operation for this including terminal ones.
Read more >Stream (Java Platform SE 8 ) - Oracle Help Center
Streams have a BaseStream.close() method and implement AutoCloseable , but nearly all stream instances do not actually need to be closed after use....
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
yes, something like that. I’m also happy to try to add support for
Promise<Stream>
resultyou can still do it lazily - return first “half” of the stream synchronously and connect events later when you have downstream connection, though it’s not the best experience