Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

lazy-socket

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

lazy-socket

A stateless socket that always lets you write().

  • 0.0.4
  • latest
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

lazy-socket

Build Status

A stateless socket that always lets you write().

If there is an error, all previous write() callbacks will be honored. A new connection will be established as soon as the next write() occurs. Writes will not be retried.

Install

npm install lazy-socket

Usage

var LazySocket = require('lazy-socket');
var socket = LazySocket.createConnection(80, 'example.org');
socket.write('something', 'utf-8', function(err) {
  // Even if example.org is down, this callback is guaranteed to fire, and
  // there is no more error handling to do on your end.
});

License

This module is licensed under the MIT license.

FAQs

Package last updated on 10 Feb 2012

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

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc