예제 #1
0
        /// <summary>
        /// Starts listening for requests and handling them. Will initialize the server
        /// through the Initialize method if it hasn't been done already.
        /// If an error occurs, the exception will be traced and rethrown.
        /// </summary>
        public void Run()
        {
            if (!Initialized)
            {
                Initialize();
            }

            try
            {
                RequestsListener listener = new RequestsListener(mPrefix);
                listener.Run();
            }
            catch (Exception e)
            {
                Trace.WriteLine(e.Message);
                Trace.WriteLine(e.StackTrace);
                throw;
            }
        }
예제 #2
0
        /// <summary>
        /// Starts listening for requests and handling them. Will initialize the server
        /// through the Initialize method if it hasn't been done already.
        /// If an error occurs, the exception will be traced and rethrown.
        /// </summary>
        public void Run()
        {
            if (!Initialized)
                Initialize();

            try
            {
                RequestsListener listener = new RequestsListener(mPrefix);
                listener.Run();
            }
            catch (Exception e)
            {
                Trace.WriteLine(e.Message);
                Trace.WriteLine(e.StackTrace);
                throw;
            }
        }