/// <summary> /// TCP调用客户端 /// </summary> /// <param name="attribute">TCP 调用服务器端配置信息</param> /// <param name="log">日志接口</param> public TcpInternalSimpleClient(AutoCSer.Net.TcpInternalSimpleServer.ServerAttribute attribute = null, AutoCSer.Log.ILog log = null) { if (attribute == null) { attribute = AutoCSer.Net.TcpInternalSimpleServer.ServerAttribute.GetConfig("TcpInternalSimpleServerPerformance", typeof(AutoCSer.TestCase.TcpInternalSimpleServerPerformance.InternalSimpleServer)); } _TcpClient_ = new AutoCSer.Net.TcpInternalSimpleServer.Client <TcpInternalSimpleClient>(this, attribute, log); if (attribute.IsAuto) { _TcpClient_.TryCreateSocket(); } }
/// <summary> /// TcpInternalSimpleServerPerformance TCP调用服务端 /// </summary> /// <param name="attribute">TCP 调用服务器端配置信息</param> /// <param name="verify">套接字验证委托</param> /// <param name="value">TCP 服务目标对象</param> /// <param name="log">日志接口</param> public TcpInternalSimpleServer(AutoCSer.Net.TcpInternalSimpleServer.ServerAttribute attribute = null, Func <System.Net.Sockets.Socket, bool> verify = null, AutoCSer.TestCase.TcpInternalSimpleServerPerformance.InternalSimpleServer value = null, AutoCSer.Log.ILog log = null) : base(attribute ?? (attribute = AutoCSer.Net.TcpInternalSimpleServer.ServerAttribute.GetConfig("TcpInternalSimpleServerPerformance", typeof(AutoCSer.TestCase.TcpInternalSimpleServerPerformance.InternalSimpleServer))), verify, log, false) { Value = value ?? new AutoCSer.TestCase.TcpInternalSimpleServerPerformance.InternalSimpleServer(); setCommandData(2); setCommand(0); setCommand(1); if (attribute.IsAutoServer) { Start(); } }
/// <summary> /// TCP调用服务端 /// </summary> /// <param name="attribute">TCP调用服务器端配置信息</param> /// <param name="verify">TCP验证实例</param> /// <param name="log">日志接口</param> public @ServerName(AutoCSer.Net.TcpInternalSimpleServer.ServerAttribute attribute = null, Func <System.Net.Sockets.Socket, bool> verify = null, AutoCSer.Log.ILog log = null) : base(attribute ?? (attribute = AutoCSer.Net.TcpStaticSimpleServer.ServerAttribute.GetConfig("@ServerRegisterName" /*IF:TcpServerAttributeType*/, typeof(@TcpServerAttributeType) /*IF:TcpServerAttributeType*/, true)), verify, log, @IsCallQueue) { setCommandData(@MethodIndexs.Length); #region LOOP MethodIndexs #region NOT IsNullMethod #region IF IsVerifyMethod setVerifyCommand(@MethodIndex); #endregion IF IsVerifyMethod #region NOT IsVerifyMethod setCommand(@MethodIndex); #endregion NOT IsVerifyMethod #endregion NOT IsNullMethod #endregion LOOP MethodIndexs if (attribute.IsAutoServer) { Start(); } }