ApiServer编译通过,测试失败,IMessage要换成Packet,过滤器、编码器等是否保留还需要考虑
大石头
authored at
2018-04-23 02:06:49
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);
//}
}
}
|