public CoapDtlsServerTransport(CoapDtlsServerEndPoint endPoint, ICoapHandler coapHandler, IDtlsServerFactory tlsServerFactory, ILogger <CoapDtlsServerTransport> logger)
        {
            _endPoint         = endPoint ?? throw new ArgumentNullException(nameof(endPoint));
            _coapHandler      = coapHandler ?? throw new ArgumentNullException(nameof(coapHandler));
            _tlsServerFactory = tlsServerFactory ?? throw new ArgumentNullException(nameof(tlsServerFactory));
            _logger           = logger ?? throw new ArgumentNullException(nameof(logger));

            SecureRandom random = new SecureRandom();

            _serverProtocol = new DtlsServerProtocol(random);

            _sessions = new ConcurrentDictionary <IPEndPoint, CoapDtlsServerClientEndPoint>();
        }
 /// <param name="loggerFactory">LoggerFactory to use for transport logging</param>
 /// <param name="dtlsStatisticsStore">a <see cref="DtlsStatisticsStore"/> to store connection statistics in.</param>
 public CoapDtlsServerTransportFactory(ILoggerFactory loggerFactory, IDtlsServerFactory tlsServerFactory)
 {
     _loggerFactory    = loggerFactory ?? throw new ArgumentNullException(nameof(loggerFactory));
     _tlsServerFactory = tlsServerFactory ?? throw new ArgumentNullException(nameof(tlsServerFactory));
 }