<commit_before>// Sort of like a twisted protocol
jsio('import net');
jsio('import lib.Enum as Enum');

var ctx = jsio.__env.global;

exports.Protocol = Class(function() {
	this.connectionMade = function(isReconnect) {}
	this.dataReceived = function(data) {}
	this.connectionLost = function(reason) {}
	
	this._connectionMade = function() {
		this._isConnected = true;
		this.connectionMade.apply(this, arguments);
	}

	this._connectionLost = function() {
		this._isConnected = true;
		this.connectionLost.apply(this, arguments);
	}
<commit_msg>Protocol interface should set _isConnected to false by default<commit_after>// Sort of like a twisted protocol
jsio('import net');
jsio('import lib.Enum as Enum');

var ctx = jsio.__env.global;

exports.Protocol = Class(function() {
	this.connectionMade = function(isReconnect) {}
	this.dataReceived = function(data) {}
	this.connectionLost = function(reason) {}
	
	this._connectionMade = function() {
		this._isConnected = true;
		this.connectionMade.apply(this, arguments);
	}

	this._connectionLost = function() {
		this._isConnected = true;
		this.connectionLost.apply(this, arguments);
	}

	this._isConnected = false;
{'fraction_non_alphanumeric': 0.1293916023993145, 'fraction_numerical': 0.0, 'mean_word_length': 5.020618556701031, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5079066', 'n_tokens_mistral': 382, 'n_tokens_neox': 354, 'n_words': 82}