コード例 #1
0
ファイル: Server.cs プロジェクト: coycooper/Projects_Coy
        /// <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
ファイル: Server.cs プロジェクト: JamesHyunKim/weblabdeusto
        /// <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;
            }
        }