Example #1
0
 public RpcTcpServer(RpcTcpConfigurationServer configuration)
 {
     if (configuration == null)
     {
         throw new ArgumentNullException(nameof(configuration));
     }
     if (configuration.Serializer == null)
     {
         throw new ArgumentNullException(nameof(configuration.Serializer));
     }
     configuration.Lock();
     this.configuration       = configuration;
     this.innerTcpServer      = new InnerTcpServer(this, configuration);
     this.stashedConnections  = new ConcurrentStack <RpcTcpConnection>();
     this.logger              = configuration.LogManager.GetLogger(nameof(RpcTcpServer));
     this.logger.Meta["kind"] = this.GetType().Name;
     this.logger.Meta["tag"]  = new RefLogLabel <RpcTcpServer>(this, s => s.Tag);
 }
Example #2
0
 public InnerTcpServer(RpcTcpServer parent, RpcTcpConfigurationServer configuration) : base(configuration.TcpConfiguration)
 {
     this.parent = parent;
 }