Gamestudio Links
Zorro Links
Newest Posts
AlpacaZorroPlugin v1.3.0 Released
by kzhao. 05/22/24 13:41
Free Live Data for Zorro with Paper Trading?
by AbrahamR. 05/18/24 13:28
Change chart colours
by 7th_zorro. 05/11/24 09:25
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
1 registered members (AndrewAMD), 1,403 guests, and 6 spiders.
Key: Admin, Global Mod, Mod
Newest Members
AemStones, LucasJoshua, Baklazhan, Hanky27, firatv
19055 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Page 2 of 3 1 2 3
Re: [Anet] and port forwarding workarounds [Re: Carlos3DGS] #378858
07/27/11 08:35
07/27/11 08:35
Joined: Jul 2005
Posts: 1,930
Austria
Dark_samurai Offline
Serious User
Dark_samurai  Offline
Serious User

Joined: Jul 2005
Posts: 1,930
Austria
It is already implemented and seems to work well. A small "pre beta" of the new ANet version was released a few days ago. If you want you can join?

There are not all functions for the new version implemented yet (the voip feature isn't finished yet and also some changes on the entity system have to be done). After that a public Beta will be released.

Edit: Had a lot of fun on my vacation, thanks laugh

Last edited by Dark_samurai; 07/27/11 08:37.

ANet - A stable and secure network plugin with multi-zone, unlimited players, voip, server-list features,... (for A7/A8)!
get free version
Re: [Anet] and port forwarding workarounds [Re: Dark_samurai] #378869
07/27/11 13:16
07/27/11 13:16
Joined: Jun 2007
Posts: 1,337
Hiporope and its pain
txesmi Offline
Serious User
txesmi  Offline
Serious User

Joined: Jun 2007
Posts: 1,337
Hiporope and its pain
great to hear that!

Re: [Anet] and port forwarding workarounds [Re: txesmi] #385747
10/23/11 10:40
10/23/11 10:40
Joined: Jul 2010
Posts: 12
Germany
Z
Zwiebli Offline
Newbie
Zwiebli  Offline
Newbie
Z

Joined: Jul 2010
Posts: 12
Germany
I have a small question concerning the new ANet Voip system (version 1.4+) and portforwarding. As the new ANet Voip feature is now peer-to-peer based, does it mean you have to forward also the ports as a Voip client if your pc is behind a router to be able to communicate?

Re: [Anet] and port forwarding workarounds [Re: Zwiebli] #385748
10/23/11 11:17
10/23/11 11:17
Joined: Nov 2002
Posts: 913
Berlin, Germany
S
SchokoKeks Offline
User
SchokoKeks  Offline
User
S

Joined: Nov 2002
Posts: 913
Berlin, Germany
good question! would like to know that, too.

Re: [Anet] and port forwarding workarounds [Re: SchokoKeks] #385752
10/23/11 13:45
10/23/11 13:45
Joined: Jul 2005
Posts: 1,930
Austria
Dark_samurai Offline
Serious User
Dark_samurai  Offline
Serious User

Joined: Jul 2005
Posts: 1,930
Austria
You only have to forward the VoIP server port. A technic called NAT punsh-through is used to determine the client ports outside the router. Thus no portforwarding is needed for the clients.


ANet - A stable and secure network plugin with multi-zone, unlimited players, voip, server-list features,... (for A7/A8)!
get free version
Re: [Anet] and port forwarding workarounds [Re: Dark_samurai] #385756
10/23/11 14:43
10/23/11 14:43
Joined: Jul 2010
Posts: 12
Germany
Z
Zwiebli Offline
Newbie
Zwiebli  Offline
Newbie
Z

Joined: Jul 2010
Posts: 12
Germany
Thx thats good.
Now if you have a server and connect 2 clients both behind a router, is it possible to use the udp socket functions to directly send data between the two clients by using this "NAT punsh-through technique" so you only have to forward the port of the server if it is behind a router as well? Would this be possible? Like your VOip feature allready does more or less.

Re: [Anet] and port forwarding workarounds [Re: Zwiebli] #385759
10/23/11 14:56
10/23/11 14:56
Joined: Jul 2005
Posts: 1,930
Austria
Dark_samurai Offline
Serious User
Dark_samurai  Offline
Serious User

Joined: Jul 2005
Posts: 1,930
Austria
Yes that would be possible.

Shematic network example:
Code:
[client1]----[router1]---------------------------[router3]----------[server]
Port 2300              Port 8947      |           Port 2300           Port 2300
                                      |
[client2]----[router2]----------------
Port 2300              Port 38495



The problem is, that the routers change the port number of client 1 and 2 because of NAT/PAT as you can see in the example above. Thus if the server wants to send a packet to client1 and uses port 2300 it won't work.

Solution (NAT punsh-through): The server is reachable through port 2300 because port forwarding was done here. Now all clients contact the server by sending a packet. Thus the server can store the destination ports of the packets (which are 8947 and 38495). If the server then sends a packet to these ports, the clients will receive the packet.

And that's it. It's very simple.


ANet - A stable and secure network plugin with multi-zone, unlimited players, voip, server-list features,... (for A7/A8)!
get free version
Re: [Anet] and port forwarding workarounds [Re: Dark_samurai] #385769
10/23/11 17:40
10/23/11 17:40
Joined: Jul 2010
Posts: 12
Germany
Z
Zwiebli Offline
Newbie
Zwiebli  Offline
Newbie
Z

Joined: Jul 2010
Posts: 12
Germany
1. Thx for quick and nice reply laugh
2. Does this mean if i know which ports the clients routers are using client1 can also send a package directly to client 2 using the port 38495?
3. So this means if I don`t manually do portforwarding and tell the router which port it has to use it just gonna choose a random port that is usable if i send package from a pc behind a router, to the server.
4. Now I think the header of every package contains the port it was sent from but how can the server find out the port? Is there a function to find it out?
5. Thx for your great help

Re: [Anet] and port forwarding workarounds [Re: Zwiebli] #385773
10/23/11 18:30
10/23/11 18:30
Joined: Jul 2005
Posts: 1,930
Austria
Dark_samurai Offline
Serious User
Dark_samurai  Offline
Serious User

Joined: Jul 2005
Posts: 1,930
Austria
1. No problem wink

2. Yes. The server should store all ports of the clients in a table. If a new client connects, you could send the whole table to all participants for example.

3. Yes, that's basicly what NAT/PAT is doing. This technic allows you to access the internet through more than one pc at the same time, although you only have one internet ip address. You can find more informations about that in wikipedia.

4. Every packet contains the source and destination port. You are right, this is currently not possible because the sock_recv() function doesn't return the destination port. This will be changed!


ANet - A stable and secure network plugin with multi-zone, unlimited players, voip, server-list features,... (for A7/A8)!
get free version
Re: [Anet] and port forwarding workarounds [Re: Dark_samurai] #385778
10/23/11 18:41
10/23/11 18:41
Joined: Jul 2010
Posts: 12
Germany
Z
Zwiebli Offline
Newbie
Zwiebli  Offline
Newbie
Z

Joined: Jul 2010
Posts: 12
Germany
I was reading stuff about udp, portforwarding... all day but wasn`t quite sure if i understood all the stuff correctly. So thx for the extra explanations.
4. Awesome can`t wait cool Is it realistic that this feature will be avaiable in ANet v1.5 allready?

I think this would be a better port forwarding workaround than using upnp

Thx again

Last edited by Zwiebli; 10/23/11 18:42.
Page 2 of 3 1 2 3

Moderated by  HeelX, Spirit 

Gamestudio download | chip programmers | Zorro platform | shop | Data Protection Policy

oP group Germany GmbH | Birkenstr. 25-27 | 63549 Ronneburg / Germany | info (at) opgroup.de

Powered by UBB.threads™ PHP Forum Software 7.7.1