/// <summary>
 ///     TCP调用服务端
 /// </summary>
 /// <param name="attribute">配置信息</param>
 protected TmphServer(TmphTcpServer attribute)
 {
     if (attribute == null) TmphLog.Error.Throw(TmphLog.TmphExceptionType.Null);
     if (attribute.TcpRegisterName != null)
     {
         tcpRegisterClient = TmphTcpRegister.TmphClient.Get(attribute.TcpRegisterName);
         if (tcpRegisterClient == null)
             TmphLog.Error.Throw("TCP注册服务 " + attribute.TcpRegisterName + " 链接失败", true, false);
         var state = tcpRegisterClient.Register(attribute);
         if (state != TmphTcpRegister.TmphRegisterState.Success)
             TmphLog.Error.Throw("TCP服务注册 " + attribute.ServiceName + " 失败 " + state, true, false);
         TmphLog.Default.Add(attribute.ServiceName + " 注册 " + attribute.Host + ":" + attribute.Port.toString(),
             false, false);
     }
     if (!attribute.IsServer) TmphLog.Default.Add("配置未指明的TCP服务端 " + attribute.ServiceName, true, false);
     this.attribute = attribute;
 }