0.1.3 • Published 9 years ago

dual-clientpool v0.1.3

Weekly downloads
6
License
MIT
Repository
github
Last release
9 years ago

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.

0.1.3

9 years ago

0.1.2

9 years ago

0.1.1

9 years ago

0.1.0

9 years ago