Socket
Book a DemoInstallSign in
Socket

create-stream-server

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

create-stream-server

create multiple stream servers easily

0.1.1
latest
Source
npmnpm
Version published
Weekly downloads
1.9K
1.78%
Maintainers
1
Weekly downloads
 
Created
Source

create-stream-server  Build Status npm version

create multiple stream servers easily

Example

var css = require('create-stream-server');

var servers = css({
  s1: 'tcp://localhost:8080',
  s2: 'ssl://0.0.0.0:80',
  s3: {
    protocol: 'wss',
    host: 'localhost',
    port: 8888,
    ssl: {
      key: fs.readFileSync('./wss_server.key'),
      cert: fs.readFileSync('./wss_server.crt')
    }
  },
  s4: {
    attach: existingHttpServer
  }
}, {
  ssl: {
    key: fs.readFileSync('./server.key'),
    cert: fs.readFileSync('./server.crt')
  }
}, function(clientStream, server){
  // handle the connected client as a stream
});

// to start
servers.listen(function(){
  console.log('launched!');
});

// after some time
servers.close(function(){
  console.log('done!');
});

// to release all resources
servers.destroy(function(){
  console.log('all gone!');
});

Contributing

create-stream-server is an OPEN Open Source Project. This means that:

Individuals making significant and valuable contributions are given commit-access to the project to contribute as they see fit. This project is more like an open wiki than a standard guarded open source project.

See the CONTRIBUTING.md file for more details.

Contributors

create-stream-server is only possible due to the excellent work of the following contributors:

Joël GähwilerGitHub/256dpiTwitter/@256dpi
Matteo CollinaGitHub/mcollinaTwitter/@matteocollina

License

MIT

FAQs

Package last updated on 27 Jan 2015

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.