This package has been deprecated

Author message:

Incompatible with dualapi 1.x

dual-clientpool

0.1.3 • Public • Published

DEPRECATED Incompatible with dualapi 1.x.

Client pool for dualapi.

Extends a dualapi domain with a multiplexer for socket.io connections.

Connecting

Given a dualapi domain

var domain = dualapi();

Extend the domain with the connect method:

var clientpool = require('dual-clientpool');
domain = clientpool(domain, ['ready']);

When a client connects, connect the socket to the domain:

io.listen().on('connect', function (socket) {
    domain.connect(socket);
});

Connection response

The client is given a unique mount point in the domain such as ['client', xxxxx], where xxxxx is a unique id. The server then sends ['ready'], to the ['index'] host on the client.

Disconnect

When the client disconnects, a message is sent to ['disconnect', 'client', xxxxx] on the server.

Readme

Keywords

Package Sidebar

Install

npm i dual-clientpool

Weekly Downloads

1

Version

0.1.3

License

MIT

Last publish

Collaborators

  • plediii