AAO25.com

Community => Games & Programming => Topic started by: Edgard2016 on Saturday, February 03, 2018, 22:01:16 PM

Title: [PROGRAMING] How to make NAT connection to get data?
Post by: Edgard2016 on Saturday, February 03, 2018, 22:01:16 PM
Hi guys,

I'm a brazilian developer, i'm trying connection tcp for get players connecteds, count players connecteds, etc.. in the ports 1716 and 1717 but my connection is denied.

Do I need to pass a key in the connection header? Similar to consuming a webservice

Could someone give a hand, please.

Best regards.
Blaska
Title: Re: [PROGRAMING] How to make NAT connection to get data?
Post by: Vanoke on Sunday, February 04, 2018, 03:16:30 AM
try 1716    1718
Title: Re: [PROGRAMING] How to make NAT connection to get data?
Post by: Edgard2016 on Sunday, February 04, 2018, 11:12:27 AM
I tried 1718 but the same thing happened.
I believe it is necessary to pass some default token to stabilize the connection and read what traffic similar to the battletracker service.

My code to try to stabilize the connection is this:

 Socket sClientToServer = new
             Socket(AddressFamily.InterNetwork, SocketType.Stream, ProtocolType.Tcp);

 IPEndPoint ipepServerEndPoint = new
             IPEndPoint(IPAddress.Parse("_IPADRESS"), _PORT);

 sClientToServer.Connect((EndPoint)ipepServerEndPoint);

Title: Re: [PROGRAMING] How to make NAT connection to get data?
Post by: [SWISS]Merlin on Sunday, February 04, 2018, 11:38:49 AM
it is udp port communication, not ip
Title: Re: [PROGRAMING] How to make NAT connection to get data?
Post by: Edgard2016 on Monday, February 05, 2018, 18:30:49 PM
Oh, thank you, I'll try udp connection.
Title: Re: [PROGRAMING] How to make NAT connection to get data?
Post by: [F.U.N]Cpt on Monday, February 05, 2018, 19:39:51 PM
 :D EZ