/// <summary>
        /// Creates <see cref="TcpService{TClient}"/> with specified <see cref="System.Net.IPEndPoint"/> and listening backlog
        /// </summary>
        public static TcpService <TClient> Create(IPEndPoint endPoint, int backlog)
        {
            var config = new TcpServiceConfiguration();

            config.AddEndPoint(new TcpServiceEndPoint(endPoint, 100));
            return(new TcpService <TClient>(config));
        }
Exemple #2
0
 protected TcpService(TcpServiceConfiguration configuration) : this()
 {
     Configuration = configuration ?? throw new ArgumentNullException(nameof(configuration));
 }
 public TcpService(TcpServiceConfiguration configuration) : base(configuration)
 {
 }