lib/protocol/t125/mcs.js
function MCS(transport, recvOpCode, sendOpCode) {
	this.transport = transport;
	this.recvOpCode = recvOpCode;
	this.sendOpCode = sendOpCode;
	this.channels = [{id : Channel.MCS_GLOBAL_CHANNEL, name : 'global'}];
	this.channels.find = function(callback) {
		for(var i in this) {
			if(callback(this[i])) return this[i];
		};
	};
	
	// bind events
	var self = this;
	this.transport.on('close', function () {
		self.emit('close');
	}).on('error', function (err) {
		self.emit('error', err);
	});
}
function MCS(transport, recvOpCode, sendOpCode) {
	this.transport = transport;
	this.recvOpCode = recvOpCode;
	this.sendOpCode = sendOpCode;
	this.channels = [{id : Channel.MCS_GLOBAL_CHANNEL, name : 'global'}];
	this.channels.find = function(callback) {
		for(var i in this) {
			if(callback(this[i])) return this[i];
		};
	};
	
	// bind events
	var self = this;
	this.transport.on('close', function () {
		self.emit('close');
	}).on('error', function (err) {
		self.emit('error', err);
	});
}
function MCS ( transport , recvOpCode , sendOpCode ) { this . transport = transport ; this . recvOpCode = recvOpCode ; this . sendOpCode = sendOpCode ; this . channels = [ { id : Channel . MCS_GLOBAL_CHANNEL , name : 'global' } ] ; this . channels . find = function ( callback ) { for ( var i in this ) { if ( callback ( this [ i ] ) ) return this [ i ] ; } ; } ; // bind events var self = this ; this . transport . on ( 'close' , function ( ) { self . emit ( 'close' ) ; } ) . on ( 'error' , function ( err ) { self . emit ( 'error' , err ) ; } ) ; }
Multi-Channel Services
@param transport {events.EventEmitter} transport layer listen (connect, data) events
@param recvOpCode {DomainMCSPDU} opcode use in receive automata
@param sendOpCode {DomainMCSPDU} opcode use to send message
Multi - Channel Services