 
 		private var _opened:Boolean;
 		private var _alive:Boolean;
+		private var _messaging:Boolean;
 
 		private var _processor:ConnectionProcessor;
 		private var _channel:Channel;

					}
					else {
						_outputMessages.removeFirst();
						if (!_outputMessages.isEmpty()) {
							sendMessage0(ByteArray(_outputMessages.getFirst()));
						}
					}
				}
			}
		}

		private function sendMessage0(message:ByteArray):void {
			if (message.length == 0) {
				throw new IllegalArgumentException("Outgoing message is empty");
			}

		}

		internal function beginSession(sid:ByteArray, activityTimeout:int, recoveryTimeout:int):void {


			_logger.debug("Begin session (sid: {}, activityTimeout: {}, recoveryTimeout: {})", sid, activityTimeout, recoveryTimeout);

			_sid = sid;
			_activityTimeout = activityTimeout;
			_recoveryTimeout = recoveryTimeout;

			callDelayed(beginSessionDelayed);
		}

		internal function recoverSession():void {
			_logger.debug("Recover session");

			writeByteToChannel(_inputMessageEven ? Protocol.MESSAGE_EVEN_RECEIVED : Protocol.MESSAGE_ODD_RECEIVED);

			callDelayed(recoverSessionDelayed);
		}

		internal function sendByte(byte:int):void {
