Gamestudio Links
Zorro Links
Newest Posts
Change chart colours
by 7th_zorro. 05/11/24 09:25
Data from CSV not parsed correctly
by dr_panther. 05/06/24 18:50
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
2 registered members (alibaba, vicknick), 1,492 guests, and 4 spiders.
Key: Admin, Global Mod, Mod
Newest Members
firatv, wandaluciaia, Mega_Rod, EternallyCurious, howardR
19050 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Looking for some sort of "ping" function #426700
07/27/13 12:25
07/27/13 12:25
Joined: Apr 2005
Posts: 796
U.S.A. Michigan
exile Offline OP
User
exile  Offline OP
User

Joined: Apr 2005
Posts: 796
U.S.A. Michigan
So I am building a matchmaking system off of the great serverlist example for ANet. I have the majority of it ready but I am missing a key feature, that being the actual matching tongue Here is how the process starts.

- Client searches a database for all matches listed as "open".

- The Client builds a list of the first 8 matches it can find and saves the Host IP addresses to a temp.

- The Client is then supposed to then ping each IP on that list in order and save the ping time to another temp.

- Finally the client then connects to the match which had the smallest ping value. If none of the matches have an acceptable ping (based on the clients own preferences) then the matchmaking process starts over.

I am having trouble with the third step using ANet as I am unable to find any kind of feature that would allow something along the lines of;

var pingTime = ping("255.255.255.255",80); //ping(Ip_address, port);

Obviously that would be making things way too easy but it is a feature that would be pretty useful in any future ANet updates (hint hint wink ). Until then I am trying to find some way to achieve some sort of function that would allow gamestudio to return the ping of an IP address/URL. So does anyone have ay ideas? I tried the whole 'connect, ping, disconnect' thing but its a really messy process.

Re: Looking for some sort of "ping" function [Re: exile] #426704
07/27/13 12:55
07/27/13 12:55
Joined: Nov 2007
Posts: 2,568
Germany, BW, Stuttgart
MasterQ32 Offline
Expert
MasterQ32  Offline
Expert

Joined: Nov 2007
Posts: 2,568
Germany, BW, Stuttgart
Here is an example of how to send a ping with sockets yourself:
http://tangentsoft.net/wskfaq/examples/rawping.html

This should be adaptable to ANet i think...


Visit my site: www.masterq32.de
Re: Looking for some sort of "ping" function [Re: MasterQ32] #426711
07/27/13 18:25
07/27/13 18:25
Joined: Apr 2005
Posts: 796
U.S.A. Michigan
exile Offline OP
User
exile  Offline OP
User

Joined: Apr 2005
Posts: 796
U.S.A. Michigan
Thanks for the link, I will try to look into this to see if I cant come up with something. If I do I will definitely share it among my fellow 3DGS peers wink Until then, anyone else have any ideas?


Moderated by  HeelX, Lukas, rayp, Rei_Ayanami, Superku, Tobias, TWO, VeT 

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