Merge branch 'master' of http://git.newlifex.com/NewLife/X
大石头 编写于 2018-09-25 18:53:17
X
using System;
using NewLife.Http;
using NewLife.Net;
using NewLife.Reflection;

namespace NewLife.Remoting
{
    class ApiHttpServer : ApiNetServer
    {
        #region 属性
        private String RawUrl;
        #endregion

        public ApiHttpServer()
        {
            Name = "Http";

            ProtocolType = NetType.Http;
        }

        /// <summary>初始化</summary>
        /// <param name="config"></param>
        /// <returns></returns>
        public override Boolean Init(String config)
        {
            RawUrl = config;

            if (!base.Init(config)) return false;

            // Http封包协议
            Add<HttpCodec>();

            return true;
        }

        ///// <summary>获取服务提供者</summary>
        ///// <param name="serviceType"></param>
        ///// <returns></returns>
        //public override Object GetService(Type serviceType)
        //{
        //    // 服务类是否当前类的基类
        //    if (GetType().As(serviceType)) return this;

        //    if (serviceType == typeof(ApiHttpServer)) return Provider;

        //    return base.GetService(serviceType);
        //}
    }
}