Skip to content

Instantly share code, notes, and snippets.

View baudehlo's full-sized avatar

Matt Sergeant baudehlo

View GitHub Profile
// A subclass of Socket which reads data by line
var net = require('net');
var util = require('util');
function Socket(options) {
if (!(this instanceof Socket)) return new Socket(options);
net.Socket.call(this, options);
this.current_data = [];
this.on('data', this.process_data);