This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 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); |