pub fn new(
        config: Arc<EndpointConfig<S>>,
        server_config: Option<Arc<ServerConfig<S>>>,
    ) -> Self {
        Self {
            rng: StdRng::from_entropy(),
            transmits: VecDeque::new(),
            connection_ids_initial: HashMap::new(),
            connection_ids: HashMap::new(),
            connection_remotes: HashMap::new(),
            connection_reset_tokens: ResetTokenTable::default(),
            connections: Slab::new(),
            incoming_handshakes: 0,
            reject_new_connections: false,
            config,
            server_config,
        }
    }
/// Create a new endpoint
///
/// Returns `Err` if the configuration is invalid.
Create a new endpoint
Returns `Err` if the configuration is invalid.
Create a new endpoint Returns ` Err ` if the configuration is invalid .
pub fn new(
        config: Arc<EndpointConfig<S>>,
        server_config: Option<Arc<ServerConfig<S>>>,
    ) -> Self {
        Self {
            rng: StdRng::from_entropy(),
            transmits: VecDeque::new(),
            connection_ids_initial: HashMap::new(),
            connection_ids: HashMap::new(),
            connection_remotes: HashMap::new(),
            connection_reset_tokens: ResetTokenTable::default(),
            connections: Slab::new(),
            incoming_handshakes: 0,
            reject_new_connections: false,
            config,
            server_config,
        }
    }
pub fn new ( config : Arc < EndpointConfig < S > > , server_config : Option < Arc < ServerConfig < S > > > , ) -> Self { Self { rng : StdRng :: from_entropy ( ) , transmits : VecDeque :: new ( ) , connection_ids_initial : HashMap :: new ( ) , connection_ids : HashMap :: new ( ) , connection_remotes : HashMap :: new ( ) , connection_reset_tokens : ResetTokenTable :: default ( ) , connections : Slab :: new ( ) , incoming_handshakes : 0 , reject_new_connections : false , config , server_config , } }
Create a new endpoint
Returns `Err` if the configuration is invalid.
Create a new endpoint Returns ` Err ` if the configuration is invalid .
config
Arc<EndpointConfig<S>>
server_config
Option<Arc<ServerConfig<S>>>