code: function Connection(options) {
  	
  	if (!(this instanceof Connection)){
  		return new Connection(options);
  	}
  	
  	
  	this.prefixCounter = 0;
  	this.serverMessages = {};
  	this._options = {
  		username: options.username || options.user || '',
  		password: options.password || '',
  		host: options.host || 'localhost',
  		port: options.port || 143,
  		secure: options.secure === true ? { // secure = true means default behavior
  			rejectUnauthorized: false // Force pre-node-0.9.2 behavior
  		} : (options.secure || false),
  		timeout: options.timeout || 10000, // connection timeout in msecs
  		xoauth: options.xoauth,
  		xoauth2: options.xoauth2
  	};
  	
  	this._messages = {};
  	this._messages = {};
  	
  	if (options.debug===true){
  		this.debug = function(msg){
  			console.log(msg);
  		}
  	}
  	
  		
  	if (options.chainDebug===true){
  		this.chainDebug = function(msg){
  			console.log(msg);
  		}
  	}
  	
  	this.socket = null;
  	
  	this._messages_prefix_key={};
  	this._messages_key_prefix={};
  	this._messages={};
  	
  	
  	this._msg_buffer = '';
  	this._resetChainCommands();
  }
docs: Create a new instance of Connection. This instance inherits all functions of the EventEmitter.
  
  @constructor
  @this {Connection}
  @param {object} options