# stream-url-node

> [stream-url][su] marries streams and urls.

Latest version **0.1.1** (published 2015-12-31) · MIT license · 0 weekly downloads

## Install

```sh
npm install stream-url-node
pnpm add stream-url-node
yarn add stream-url-node
bun add stream-url-node
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.1.1 |
| Published | 2015-12-31 |
| First published | 2015-11-18 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 1 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 1 |
| Author | Victor Grishchenko |
| Maintainers | gritzko |

## Links

- npm: https://www.npmjs.com/package/stream-url-node
- Repository: https://github.com/gritzko/stream-url-node
- Homepage: http://github.com/gritzko/stream-url-node
- Issues: https://github.com/gritzko/stream-url-node/issues
- npm.io page: https://npm.io/package/stream-url-node

## Dependencies (1)

- [stream-url](https://npm.io/package/stream-url.md) 0.1.x

## Recent versions

- 0.1.1 (latest) — 2015-12-31
- 0.1.0 — 2015-12-31
- 0.0.1 — 2015-11-18

## README

# Node API adapters for stream-url (TCP)

[stream-url][su] marries streams and urls. 

This package implements protocol adapters for all kinds of
streams Node.js API provides access to.

- [x] TCP, `tcp://address:port`
- [ ] filesystem sockets
- [ ] UDP
- [ ] HTTP
- [ ] stdin/stdout

API user can start a server or a client connection using an
ultra-compact universal interface of two methods:
`listen` and `connect`.

    // Server

    var su = require('stream-url-node');

    // start a WebSocket echo server
    su.listen ('tcp://localhost:1234', function ready(err, server) {

        if (err) {
            console.error(err);
            return;
        }

        server.on('connection', function (stream) {

            stream.on('data', stream.write.bind(stream));

        })

    });


    // Client

    var su = require('stream-url-ws');

    su.connect('tcp://localhost:1234', function ready(err, stream) {

        stream.on ('data', function log (data) {
            console.log(''+data);
            stream.end();
        });

        stream.write('Hello world!');

    });


[su]: https://github.com/gritzko/stream-url

---
_Source: https://npm.io/package/stream-url-node · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
