MCPcopy Index your code
hub / github.com/dan-manges/m2node / Handler

Function Handler

lib/m2node/handler.js:16–24  ·  view source on GitHub ↗
(options)

Source from the content-addressed store, hash-verified

14 Handler = (function() {
15 __extends(Handler, events.EventEmitter);
16 function Handler(options) {
17 this.pullSocket = zeromq.createSocket('pull');
18 this.pullSocket.connect(options.recv_spec);
19 this.pullSocket.on('message', __bind(function(message) {
20 return this.emit('request', new MongrelRequest(message));
21 }, this));
22 this.pubSocket = zeromq.createSocket('pub');
23 this.pubSocket.connect(options.send_spec);
24 }
25 Handler.prototype.sendResponse = function(request, response) {
26 var header, outBuffer;
27 header = [request.uuid, ' ', request.connectionId.length, ':', request.connectionId, ', '].join('');

Callers

nothing calls this directly

Calls 1

__bindFunction · 0.85

Tested by

no test coverage detected