<commit_before>/**
 * @module client/messages
 * @private
 */
 
define(function(require, exports, module) {

	var PubSub = require('../shared/pubSub');

	/**
	 * @classdesc Centralized communication infrastructure for one session.
	 * Every session or player can send messages to the outside world
	 * and subscribe to messages, using a custom filter.
	 * @class
	 * @param socket socket.io socket instance that connects the
	 *  using session to the outside world
	 * @private
	 */
	exports.MessageBus = function (socket) {
		var messageBus = this;

		this.socket = socket;
		this.pubSub = new PubSub();

		socket.on('disconnect', function () {
			messageBus.onSocketMessage({
				name: 'disconnect',
				fromInstance: 'session'
			});
		});
		socket.on('multi', function (data) {
			messageBus.onSocketMessage(data);
		});
	};
<commit_msg>Fixed nasty this-will-only-work-on-windows typo m(<commit_after>/**
 * @module client/messages
 * @private
 */
 
define(function(require, exports, module) {

	var PubSub = require('../shared/PubSub');

	/**
	 * @classdesc Centralized communication infrastructure for one session.
	 * Every session or player can send messages to the outside world
	 * and subscribe to messages, using a custom filter.
	 * @class
	 * @param socket socket.io socket instance that connects the
	 *  using session to the outside world
	 * @private
	 */
	exports.MessageBus = function (socket) {
		var messageBus = this;

		this.socket = socket;
		this.pubSub = new PubSub();

		socket.on('disconnect', function () {
			messageBus.onSocketMessage({
				name: 'disconnect',
				fromInstance: 'session'
			});
		});
		socket.on('multi', function (data) {
			messageBus.onSocketMessage(data);
		});
	};

{'fraction_non_alphanumeric': 0.1256544502617801, 'fraction_numerical': 0.0, 'mean_word_length': 3.6486486486486487, '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': '1647985', 'n_tokens_mistral': 555, 'n_tokens_neox': 485, 'n_words': 152}