3636
3737use crate :: tls:: build_native_cert_store;
3838use crate :: tls:: Identity ;
39- use quinn:: EndpointConfig ;
40- use quinn:: TransportConfig ;
4139use socket2:: Domain as SocketDomain ;
4240use socket2:: Protocol as SocketProtocol ;
4341use socket2:: Socket ;
@@ -65,17 +63,17 @@ pub type TlsClientConfig = rustls::ClientConfig;
6563/// Alias of [`crate::quinn::TransportConfig`].
6664#[ cfg( feature = "quinn" ) ]
6765#[ cfg_attr( docsrs, doc( cfg( feature = "quinn" ) ) ) ]
68- pub type QuicTransportConfig = crate :: quinn:: TransportConfig ;
66+ pub type QuicTransportConfig = quinn:: TransportConfig ;
6967
7068/// Alias of [`crate::quinn::ServerConfig`].
7169#[ cfg( feature = "quinn" ) ]
7270#[ cfg_attr( docsrs, doc( cfg( feature = "quinn" ) ) ) ]
73- pub type QuicServerConfig = crate :: quinn:: ServerConfig ;
71+ pub type QuicServerConfig = quinn:: ServerConfig ;
7472
7573/// Alias of [`crate::quinn::ClientConfig`].
7674#[ cfg( feature = "quinn" ) ]
7775#[ cfg_attr( docsrs, doc( cfg( feature = "quinn" ) ) ) ]
78- pub type QuicClientConfig = crate :: quinn:: ClientConfig ;
76+ pub type QuicClientConfig = quinn:: ClientConfig ;
7977
8078/// Configuration for IP address socket bind.
8179#[ derive( Debug , Copy , Clone ) ]
@@ -241,7 +239,7 @@ pub struct InvalidIdleTimeout;
241239#[ derive( Debug ) ]
242240pub struct ServerConfig {
243241 pub ( crate ) bind_address_config : BindAddressConfig ,
244- pub ( crate ) endpoint_config : EndpointConfig ,
242+ pub ( crate ) endpoint_config : quinn :: EndpointConfig ,
245243 pub ( crate ) quic_config : quinn:: ServerConfig ,
246244}
247245
@@ -394,8 +392,8 @@ impl ServerConfigBuilder<states::WantsIdentity> {
394392 use crate :: tls:: server:: build_default_tls_config;
395393
396394 let tls_config = build_default_tls_config ( identity) ;
397- let quic_endpoint_config = EndpointConfig :: default ( ) ;
398- let quic_transport_config = TransportConfig :: default ( ) ;
395+ let quic_endpoint_config = quinn :: EndpointConfig :: default ( ) ;
396+ let quic_transport_config = quinn :: TransportConfig :: default ( ) ;
399397
400398 self . with ( tls_config, quic_endpoint_config, quic_transport_config)
401399 }
@@ -436,8 +434,8 @@ impl ServerConfigBuilder<states::WantsIdentity> {
436434 self ,
437435 tls_config : TlsServerConfig ,
438436 ) -> ServerConfigBuilder < states:: WantsTransportConfigServer > {
439- let quic_endpoint_config = EndpointConfig :: default ( ) ;
440- let quic_transport_config = TransportConfig :: default ( ) ;
437+ let quic_endpoint_config = quinn :: EndpointConfig :: default ( ) ;
438+ let quic_transport_config = quinn :: TransportConfig :: default ( ) ;
441439
442440 self . with ( tls_config, quic_endpoint_config, quic_transport_config)
443441 }
@@ -489,7 +487,7 @@ impl ServerConfigBuilder<states::WantsIdentity> {
489487 use crate :: tls:: server:: build_default_tls_config;
490488
491489 let tls_config = build_default_tls_config ( identity) ;
492- let quic_endpoint_config = EndpointConfig :: default ( ) ;
490+ let quic_endpoint_config = quinn :: EndpointConfig :: default ( ) ;
493491
494492 self . with ( tls_config, quic_endpoint_config, quic_transport_config)
495493 }
@@ -515,7 +513,7 @@ impl ServerConfigBuilder<states::WantsIdentity> {
515513 tls_config : TlsServerConfig ,
516514 quic_transport_config : QuicTransportConfig ,
517515 ) -> ServerConfigBuilder < states:: WantsTransportConfigServer > {
518- let quic_endpoint_config = EndpointConfig :: default ( ) ;
516+ let quic_endpoint_config = quinn :: EndpointConfig :: default ( ) ;
519517 self . with ( tls_config, quic_endpoint_config, quic_transport_config)
520518 }
521519
@@ -527,16 +525,16 @@ impl ServerConfigBuilder<states::WantsIdentity> {
527525 pub fn build_with_quic_config ( self , quic_config : QuicServerConfig ) -> ServerConfig {
528526 ServerConfig {
529527 bind_address_config : self . 0 . bind_address_config ,
530- endpoint_config : EndpointConfig :: default ( ) ,
528+ endpoint_config : quinn :: EndpointConfig :: default ( ) ,
531529 quic_config,
532530 }
533531 }
534532
535533 fn with (
536534 self ,
537535 tls_config : TlsServerConfig ,
538- endpoint_config : EndpointConfig ,
539- transport_config : TransportConfig ,
536+ endpoint_config : quinn :: EndpointConfig ,
537+ transport_config : quinn :: TransportConfig ,
540538 ) -> ServerConfigBuilder < states:: WantsTransportConfigServer > {
541539 ServerConfigBuilder ( states:: WantsTransportConfigServer {
542540 bind_address_config : self . 0 . bind_address_config ,
@@ -723,7 +721,7 @@ impl ServerConfigBuilder<states::WantsTransportConfigServer> {
723721#[ derive( Debug ) ]
724722pub struct ClientConfig {
725723 pub ( crate ) bind_address_config : BindAddressConfig ,
726- pub ( crate ) endpoint_config : EndpointConfig ,
724+ pub ( crate ) endpoint_config : quinn :: EndpointConfig ,
727725 pub ( crate ) quic_config : quinn:: ClientConfig ,
728726 pub ( crate ) dns_resolver : Arc < dyn DnsResolver + Send + Sync > ,
729727}
@@ -874,8 +872,8 @@ impl ClientConfigBuilder<states::WantsRootStore> {
874872 use crate :: tls:: client:: build_default_tls_config;
875873
876874 let tls_config = build_default_tls_config ( Arc :: new ( build_native_cert_store ( ) ) , None ) ;
877- let endpoint_config = EndpointConfig :: default ( ) ;
878- let transport_config = TransportConfig :: default ( ) ;
875+ let endpoint_config = quinn :: EndpointConfig :: default ( ) ;
876+ let transport_config = quinn :: TransportConfig :: default ( ) ;
879877
880878 self . with ( tls_config, endpoint_config, transport_config)
881879 }
@@ -915,8 +913,8 @@ impl ClientConfigBuilder<states::WantsRootStore> {
915913 Some ( Arc :: new ( NoServerVerification :: new ( ) ) ) ,
916914 ) ;
917915
918- let endpoint_config = EndpointConfig :: default ( ) ;
919- let transport_config = TransportConfig :: default ( ) ;
916+ let endpoint_config = quinn :: EndpointConfig :: default ( ) ;
917+ let transport_config = quinn :: TransportConfig :: default ( ) ;
920918
921919 self . with ( tls_config, endpoint_config, transport_config)
922920 }
@@ -954,8 +952,8 @@ impl ClientConfigBuilder<states::WantsRootStore> {
954952 Some ( Arc :: new ( ServerHashVerification :: new ( hashes) ) ) ,
955953 ) ;
956954
957- let endpoint_config = EndpointConfig :: default ( ) ;
958- let transport_config = TransportConfig :: default ( ) ;
955+ let endpoint_config = quinn :: EndpointConfig :: default ( ) ;
956+ let transport_config = quinn :: TransportConfig :: default ( ) ;
959957
960958 self . with ( tls_config, endpoint_config, transport_config)
961959 }
@@ -976,8 +974,8 @@ impl ClientConfigBuilder<states::WantsRootStore> {
976974 self ,
977975 tls_config : TlsClientConfig ,
978976 ) -> ClientConfigBuilder < states:: WantsTransportConfigClient > {
979- let endpoint_config = EndpointConfig :: default ( ) ;
980- let transport_config = TransportConfig :: default ( ) ;
977+ let endpoint_config = quinn :: EndpointConfig :: default ( ) ;
978+ let transport_config = quinn :: TransportConfig :: default ( ) ;
981979
982980 self . with ( tls_config, endpoint_config, transport_config)
983981 }
@@ -1015,7 +1013,7 @@ impl ClientConfigBuilder<states::WantsRootStore> {
10151013 use crate :: tls:: client:: build_default_tls_config;
10161014
10171015 let tls_config = build_default_tls_config ( Arc :: new ( build_native_cert_store ( ) ) , None ) ;
1018- let quic_endpoint_config = EndpointConfig :: default ( ) ;
1016+ let quic_endpoint_config = quinn :: EndpointConfig :: default ( ) ;
10191017
10201018 self . with ( tls_config, quic_endpoint_config, quic_transport_config)
10211019 }
@@ -1041,7 +1039,7 @@ impl ClientConfigBuilder<states::WantsRootStore> {
10411039 tls_config : TlsClientConfig ,
10421040 quic_transport_config : QuicTransportConfig ,
10431041 ) -> ClientConfigBuilder < states:: WantsTransportConfigClient > {
1044- let quic_endpoint_config = EndpointConfig :: default ( ) ;
1042+ let quic_endpoint_config = quinn :: EndpointConfig :: default ( ) ;
10451043 self . with ( tls_config, quic_endpoint_config, quic_transport_config)
10461044 }
10471045
@@ -1053,7 +1051,7 @@ impl ClientConfigBuilder<states::WantsRootStore> {
10531051 pub fn build_with_quic_config ( self , quic_config : QuicClientConfig ) -> ClientConfig {
10541052 ClientConfig {
10551053 bind_address_config : self . 0 . bind_address_config ,
1056- endpoint_config : EndpointConfig :: default ( ) ,
1054+ endpoint_config : quinn :: EndpointConfig :: default ( ) ,
10571055 quic_config,
10581056 dns_resolver : Arc :: < TokioDnsResolver > :: default ( ) ,
10591057 }
@@ -1062,8 +1060,8 @@ impl ClientConfigBuilder<states::WantsRootStore> {
10621060 fn with (
10631061 self ,
10641062 tls_config : TlsClientConfig ,
1065- endpoint_config : EndpointConfig ,
1066- transport_config : TransportConfig ,
1063+ endpoint_config : quinn :: EndpointConfig ,
1064+ transport_config : quinn :: TransportConfig ,
10671065 ) -> ClientConfigBuilder < states:: WantsTransportConfigClient > {
10681066 ClientConfigBuilder ( states:: WantsTransportConfigClient {
10691067 bind_address_config : self . 0 . bind_address_config ,
@@ -1226,17 +1224,17 @@ pub mod states {
12261224 pub struct WantsTransportConfigServer {
12271225 pub ( super ) bind_address_config : BindAddressConfig ,
12281226 pub ( super ) tls_config : TlsServerConfig ,
1229- pub ( super ) endpoint_config : EndpointConfig ,
1230- pub ( super ) transport_config : TransportConfig ,
1227+ pub ( super ) endpoint_config : quinn :: EndpointConfig ,
1228+ pub ( super ) transport_config : quinn :: TransportConfig ,
12311229 pub ( super ) migration : bool ,
12321230 }
12331231
12341232 /// Config builder state where transport properties can be set.
12351233 pub struct WantsTransportConfigClient {
12361234 pub ( super ) bind_address_config : BindAddressConfig ,
12371235 pub ( super ) tls_config : TlsClientConfig ,
1238- pub ( super ) endpoint_config : EndpointConfig ,
1239- pub ( super ) transport_config : TransportConfig ,
1236+ pub ( super ) endpoint_config : quinn :: EndpointConfig ,
1237+ pub ( super ) transport_config : quinn :: TransportConfig ,
12401238 pub ( super ) dns_resolver : Arc < dyn DnsResolver + Send + Sync > ,
12411239 }
12421240}
0 commit comments