@@ -121,23 +121,32 @@ public void Run()
121121 Console . WriteLine ( "Success C2. Connecting to C1: {0}, connection created: {1}" , point , peer != null ) ;
122122 } ;
123123
124- _c1 = new NetManager ( netListener ) ;
125- _c1 . NatPunchEnabled = true ;
124+ _c1 = new NetManager ( netListener )
125+ {
126+ IPv6Enabled = false ,
127+ NatPunchEnabled = true
128+ } ;
126129 _c1 . NatPunchModule . Init ( natPunchListener1 ) ;
127130 _c1 . Start ( ) ;
128131
129- _c2 = new NetManager ( netListener ) ;
130- _c2 . NatPunchEnabled = true ;
132+ _c2 = new NetManager ( netListener )
133+ {
134+ IPv6Enabled = false ,
135+ NatPunchEnabled = true
136+ } ;
131137 _c2 . NatPunchModule . Init ( natPunchListener2 ) ;
132138 _c2 . Start ( ) ;
133139
134- _puncher = new NetManager ( netListener ) ;
140+ _puncher = new NetManager ( netListener )
141+ {
142+ IPv6Enabled = false ,
143+ NatPunchEnabled = true
144+ } ;
135145 _puncher . Start ( ServerPort ) ;
136- _puncher . NatPunchEnabled = true ;
137146 _puncher . NatPunchModule . Init ( this ) ;
138147
139- _c1 . NatPunchModule . SendNatIntroduceRequest ( NetUtils . MakeEndPoint ( "::1 ", ServerPort ) , "token1" ) ;
140- _c2 . NatPunchModule . SendNatIntroduceRequest ( NetUtils . MakeEndPoint ( "::1 ", ServerPort ) , "token1" ) ;
148+ _c1 . NatPunchModule . SendNatIntroduceRequest ( "localhost ", ServerPort , "token1" ) ;
149+ _c2 . NatPunchModule . SendNatIntroduceRequest ( "localhost ", ServerPort , "token1" ) ;
141150
142151 // keep going until ESCAPE is pressed
143152 Console . WriteLine ( "Press ESC to quit" ) ;
0 commit comments