overclocked

Exceeding the Manufacturer's Specifications

Contents

Connman

Introduction

Status

Install

Usage

Connect to a Single Resource

Using your Socket

Creating a Pool

Finding a Pool

Adding a Connection to a Pool

Getting a Connection from a Pool

Getting a Handler from a Pool

Shutting Things Down

Testing

Change Log

connman -- A Socket Manager for Node.js

Introduction

connman is a simple interface to the node.js Socket class that simplifies the common use cases of connection management, optimized for long lived persistent connections. Connman handles the business of re-establishing broken connections for you, and simplifies event notifications to the bare miniimum so that your application can clean up any outstanding business for a dropped connection, and move on as soon as the connection is repaired. Best of all, connman does not mediate the socket object, so there is no magic involved, and there is no performance impact to using this library.

Also, view the annotated source.

Status

Stable Version: 2.0.0

Install

npm install connman

Usage

Connect to a Single Resource

Setting up a connection requires three parameters: Host, Port, and Handler. The fourth parameter, options, can be provided to hand to the node.js socket construction call.

The handler must implement four methods: