Beispiel #1
0
 public ZConfig DefaultGetZConfig(TcpChannel channel,
                                  InitRequestInfo info,
                                  out string strError)
 {
     strError = "";
     return(new ZConfig());
 }
Beispiel #2
0
 // 根据 @xxx 找到相关的 capo 实例,然后找到配置参数
 Result AutoSetChannelProperty(TcpChannel channel,
                               InitRequestInfo info)
 {
     if (this.SetChannelProperty == null)
     {
         return(this.DefaultSetChannelProperty(channel, info));
     }
     else
     {
         SetChannelPropertyEventArgs e = new SetChannelPropertyEventArgs();
         e.Info = info;
         this.SetChannelProperty(channel, e);
         return(e.Result);
     }
 }
Beispiel #3
0
        // 根据 @xxx 找到相关的 capo 实例,然后找到配置参数
        ZConfig AutoGetZConfig(ZServerChannel channel,
                               InitRequestInfo info,
                               out string strError)
        {
            strError = "";
            if (this.GetZConfig == null)
            {
                return(this.DefaultGetZConfig(channel, info, out strError));
            }

            GetZConfigEventArgs e = new GetZConfigEventArgs();

            e.Info = info;
            this.GetZConfig(channel, e);
            strError = e.Result.ErrorInfo;
            return(e.ZConfig);
        }
Beispiel #4
0
 public Result DefaultSetChannelProperty(TcpChannel channel,
                                         InitRequestInfo info)
 {
     return(new Result());
 }