core/handler.js
function (response_type, event) {
	
		LOG.sys('handling event response [' + response_type  + ']', l_name);
		
		// go over each registered callback function and see which one responds
		for (var i=0; i < l_responders[response_type].length; i++) {
			// find the callback with matching client id
			// call callback and see whether it has been processed
			if (l_responders[response_type][i].cid === event.cid) {
				// log incoming message type & IP/port
				LOG.sys(SR.Tags.RCV + response_type + ' from ' + event.printSource() + SR.Tags.END, l_name);

				// make callback
				UTIL.safeCall(l_responders[response_type][i].onResponse, event);

				// then remove it
				l_responders[response_type].splice(i, 1);
				i--;
			}
		}
	}
function (response_type, event) {
	
		LOG.sys('handling event response [' + response_type  + ']', l_name);
		
		// go over each registered callback function and see which one responds
		for (var i=0; i < l_responders[response_type].length; i++) {
			// find the callback with matching client id
			// call callback and see whether it has been processed
			if (l_responders[response_type][i].cid === event.cid) {
				// log incoming message type & IP/port
				LOG.sys(SR.Tags.RCV + response_type + ' from ' + event.printSource() + SR.Tags.END, l_name);

				// make callback
				UTIL.safeCall(l_responders[response_type][i].onResponse, event);

				// then remove it
				l_responders[response_type].splice(i, 1);
				i--;
			}
		}
	}
function ( response_type , event ) { LOG . sys ( 'handling event response [' + response_type + ']' , l_name ) ; // go over each registered callback function and see which one responds for ( var i = 0 ; i < l_responders [ response_type ] . length ; i ++ ) { // find the callback with matching client id // call callback and see whether it has been processed if ( l_responders [ response_type ] [ i ] . cid === event . cid ) { // log incoming message type & IP/port LOG . sys ( SR . Tags . RCV + response_type + ' from ' + event . printSource ( ) + SR . Tags . END , l_name ) ; // make callback UTIL . safeCall ( l_responders [ response_type ] [ i ] . onResponse , event ) ; // then remove it l_responders [ response_type ] . splice ( i , 1 ) ; i -- ; } } }
notify that a response to a particular event is received
notify that a response to a particular event is received