@@ -51,7 +51,7 @@ const PUBLIC_STUN_SERVER: &str = "stun.piegames.de:3478";
51
51
note = "This will be a private type in the future. Open an issue if you require access to protocol intrinsics in the future"
52
52
) ]
53
53
#[ derive( Debug ) ]
54
- pub struct TransitKey ;
54
+ pub ( crate ) struct TransitKey ;
55
55
56
56
#[ expect( deprecated) ]
57
57
impl KeyPurpose for TransitKey { }
@@ -785,7 +785,7 @@ pub fn log_transit_connection(
785
785
note = "This will be a private type in the future. Open an issue if you require access to protocol intrinsics in the future"
786
786
) ]
787
787
#[ expect( deprecated) ]
788
- pub async fn init (
788
+ pub ( crate ) async fn init (
789
789
mut abilities : Abilities ,
790
790
peer_abilities : Option < Abilities > ,
791
791
relay_hints : Vec < RelayHint > ,
@@ -931,7 +931,7 @@ impl MaybeConnectedSocket {
931
931
since = "0.7.0" ,
932
932
note = "This will be a private type in the future. Open an issue if you require access to protocol intrinsics in the future"
933
933
) ]
934
- pub struct TransitConnector {
934
+ pub ( crate ) struct TransitConnector {
935
935
/* Only `Some` if direct-tcp-v1 ability has been enabled.
936
936
* The first socket is the port from which we will start connection attempts.
937
937
* For in case the user is behind no firewalls, we must also listen to the second socket.
@@ -954,29 +954,6 @@ impl TransitConnector {
954
954
& self . our_hints
955
955
}
956
956
957
- /**
958
- * Forwards to either [`leader_connect`](Self::leader_connect) or [`follower_connect`](Self::follower_connect).
959
- *
960
- * It usually is better to call the respective functions directly by their name, as it makes
961
- * them less easy to confuse (confusion may still happen though). Nevertheless, sometimes it
962
- * is desirable to use the same code for both sides and only track the side with a boolean.
963
- */
964
- pub async fn connect (
965
- self ,
966
- is_leader : bool ,
967
- transit_key : Key < TransitKey > ,
968
- their_abilities : Abilities ,
969
- their_hints : Arc < Hints > ,
970
- ) -> Result < ( Transit , TransitInfo ) , TransitConnectError > {
971
- if is_leader {
972
- self . leader_connect ( transit_key, their_abilities, their_hints)
973
- . await
974
- } else {
975
- self . follower_connect ( transit_key, their_abilities, their_hints)
976
- . await
977
- }
978
- }
979
-
980
957
/**
981
958
* Connect to the other side, as sender.
982
959
*/
0 commit comments