/// <summary>
 /// Initializes a new instance of the HttpConnection class (Clients use this contructor)
 /// </summary>
 public HttpConnection(bool verbose)
 {
     _verbose       = verbose;
     _id            = Guid.NewGuid();
     _dispatcher    = new HttpRequestDispatcher(false);
     _messageWriter = new HttpMessageWriter();
     _messageReader = new HttpMessageReader();
 }
        /// <summary>
        /// Initializes a new instance of the HttpConnection class (Servers use this constructor)
        /// </summary>
        /// <param name="socket">The socket to be used for the lifetime of the connection</param>
        public HttpConnection(Socket socket, bool verbose)
        {
            if (socket == null)
            {
                throw new ArgumentNullException("socket", "A connection cannot be created using a null socket.");
            }

            _verbose       = verbose;
            _socket        = socket;
            _id            = Guid.NewGuid();
            _dispatcher    = new HttpRequestDispatcher(false);
            _messageWriter = new HttpMessageWriter();
            _messageReader = new HttpMessageReader();
        }
        public HttpConnection(IPEndPoint ep, bool beginReceiving, bool verbose, int sendTimeout, int recvTimeout)
        {
            if (ep == null)
            {
                throw new ArgumentNullException("ep");
            }

            _verbose       = verbose;
            _id            = Guid.NewGuid();
            _dispatcher    = new HttpRequestDispatcher(false);
            _messageWriter = new HttpMessageWriter();
            _messageReader = new HttpMessageReader();

            this.Open(ep, beginReceiving, sendTimeout, recvTimeout);
        }
		/// <summary>
		/// Initializes a new instance of the HttpConnection class (Servers use this constructor)
		/// </summary>
		/// <param name="socket">The socket to be used for the lifetime of the connection</param>
		public HttpConnection(Socket socket, bool verbose) 
		{
			if (socket == null)
				throw new ArgumentNullException("socket", "A connection cannot be created using a null socket.");

			_verbose = verbose;
			_socket = socket;
			_id = Guid.NewGuid();				
			_dispatcher = new HttpRequestDispatcher(false);
			_messageWriter = new HttpMessageWriter();	
			_messageReader = new HttpMessageReader();
		}
		public HttpConnection(IPEndPoint ep, bool beginReceiving, bool verbose, int sendTimeout, int recvTimeout)
		{
			if (ep == null)
				throw new ArgumentNullException("ep");

			_verbose = verbose;			
			_id = Guid.NewGuid();				
			_dispatcher = new HttpRequestDispatcher(false);
			_messageWriter = new HttpMessageWriter();	
			_messageReader = new HttpMessageReader();

			this.Open(ep, beginReceiving, sendTimeout, recvTimeout);
		}
		/// <summary>
		/// Initializes a new instance of the HttpConnection class (Clients use this contructor)
		/// </summary>
		public HttpConnection(bool verbose) 
		{
			_verbose = verbose;
			_id = Guid.NewGuid();	
			_dispatcher = new HttpRequestDispatcher(false);
			_messageWriter = new HttpMessageWriter();
			_messageReader = new HttpMessageReader();
		}