public TcpListenerComPort(TcpListenerComPortConfigInfo configInfo, TcpListenerComPortType type, ILoggerFactory loggerFactory = null)
 {
     this.configInfo = configInfo;
     this.type       = type;
     this.tcpClientInfoDictionary = new Dictionary <string, TcpClientInfo>();
     this.tcpListener             = null;
     this.loggerFactory           = loggerFactory;
     this.Name = configInfo.Name;
     this.connectionStateChangedEventManager = new ConnectionStateChangedEventManager(Name, loggerFactory);
 }
示例#2
0
 /// <summary>
 /// 创建通讯端口
 /// </summary>
 /// <param name="tcpListenerComPortConfigInfo">TcpListener端口配置信息</param>
 /// <param name="tcpListenerComPortType">TcpListenerComPort类型</param>
 /// <param name="loggerFactory">日志工厂</param>
 /// <returns>通讯端口</returns>
 public static IComPort Create(TcpListenerComPortConfigInfo tcpListenerComPortConfigInfo, TcpListenerComPortType tcpListenerComPortType, ILoggerFactory loggerFactory = null)
 {
     return(new TcpListenerComPort(tcpListenerComPortConfigInfo, tcpListenerComPortType, loggerFactory));
 }