 		}
 	}
 
-}+}

				
				bytes.writeByte(msgid >> 8);
				bytes.writeByte(msgid % 256);
			var i:int;
			for(i = 0; i < topicnames.length; i++){
				if (topicnames[i].length > MAX_LEN_TOPIC)
					throw new Error("Out of range ".concat(MAX_LEN_TOPIC, "!"));
				

		//
		public function publish(content:String, topicname:String, QoS:int=0, retain:int=0):void
		{
			var pattern:RegExp = /\/|\+|\#/;
			if (topicname.search(pattern) != -1)
				throw new Error("Illegal topic name,include: ".concat(TOPIC_LEVEL_SEPARATOR,TOPIC_M_LEVEL_WILDCARD,TOPIC_S_LEVEL_WILDCARD));
			//TODO:socket sever response detect.
			var bytes:ByteArray=new ByteArray();
			writeString(bytes, topicname);
