Gamestudio Links
Zorro Links
Newest Posts
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
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
3 registered members (AbrahamR, AndrewAMD, ozgur), 763 guests, and 7 spiders.
Key: Admin, Global Mod, Mod
Newest Members
Hanky27, firatv, wandaluciaia, Mega_Rod, EternallyCurious
19051 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
[ANet] Using a hostname to connect to #343693
10/08/10 23:57
10/08/10 23:57
Joined: Nov 2002
Posts: 913
Berlin, Germany
S
SchokoKeks Offline OP
User
SchokoKeks  Offline OP
User
S

Joined: Nov 2002
Posts: 913
Berlin, Germany
Hi all,

I've tried to use a hostname like "mypc.no-ip.com" to connect to my anet server. When using the IP that is behind that adress, it connects fine.
When I try to use the hostname acknex freezes instantly and crashes with the following info (in german):

Code:
Problemsignatur:
  Problemereignisname:	BEX
  Anwendungsname:	acknex.exe
  Anwendungsversion:	0.0.0.0
  Anwendungszeitstempel:	4b2a3e3e
  Fehlermodulname:	MSVCR90.dll
  Fehlermodulversion:	9.0.30729.4926
  Fehlermodulzeitstempel:	4a1743c1
  Ausnahmeoffset:	000369de
  Ausnahmecode:	c0000417
  Ausnahmedaten:	00000000
  Betriebsystemversion:	6.1.7600.2.0.0.256.48
  Gebietsschema-ID:	1031
  Zusatzinformation 1:	1546
  Zusatzinformation 2:	15467be466987c95823a957a6a74a0b3
  Zusatzinformation 3:	ab21
  Zusatzinformation 4:	ab21d1340cccbedb55fa7d4f575a334a



Is there a way to use PRAGMA_API to resolve the host to an IP i can then connect to? I've never worked with the windows API. Any chance to get this included directly into ANet?

Thanks,
SchokoKeks

Re: [ANet] Using a hostname to connect to [Re: SchokoKeks] #343727
10/09/10 16:08
10/09/10 16:08
Joined: Jul 2005
Posts: 1,930
Austria
Dark_samurai Offline
Serious User
Dark_samurai  Offline
Serious User

Joined: Jul 2005
Posts: 1,930
Austria
Hmmm... I'm not sure about that. I guess you would have to use DNS to resolve the hostname into an IP. But I don't know how difficult this would be to implement.

I think this would be a useful feature. I will take a look into that.


ANet - A stable and secure network plugin with multi-zone, unlimited players, voip, server-list features,... (for A7/A8)!
get free version
Re: [ANet] Using a hostname to connect to [Re: Dark_samurai] #344314
10/16/10 09:16
10/16/10 09:16
Joined: Jul 2005
Posts: 1,930
Austria
Dark_samurai Offline
Serious User
Dark_samurai  Offline
Serious User

Joined: Jul 2005
Posts: 1,930
Austria
I just tried it with my public server and it works fine. Are you sure that it's not caused by your code?

I used this testapplication:

Code:
#include <acknex.h>
#include "anet.h"
#include "default.c"

void main()
{
	level_load("");
	wait(3);
	
	enet_init();
	
	while(1)
	{
		if(key_1)
		{
			enet_init_server(2300,4,"");
			while(key_1) wait(1);
		}
		if(key_2)
		{
			enet_init_client("mail.aauer.com",2300,"");
			while(key_2) wait(1);
		}
		wait(1);
	}
}



I used [F11] to open the debug panel and checked if I get a ClientID. Even if ANet can't resolve the name, it shouldn't crash but throw a disconnected event.

Please test this out. It's possible that this is a bug of ANet.


ANet - A stable and secure network plugin with multi-zone, unlimited players, voip, server-list features,... (for A7/A8)!
get free version
Re: [ANet] Using a hostname to connect to [Re: Dark_samurai] #344315
10/16/10 09:24
10/16/10 09:24
Joined: Apr 2007
Posts: 3,751
Canada
WretchedSid Offline
Expert
WretchedSid  Offline
Expert

Joined: Apr 2007
Posts: 3,751
Canada
I can also confirm that Enet (and thus also Anet) is able to handle hostnames instead of just IP addresses.


Shitlord by trade and passion. Graphics programmer at Laminar Research.
I write blog posts at feresignum.com
Re: [ANet] Using a hostname to connect to [Re: WretchedSid] #344344
10/16/10 17:54
10/16/10 17:54
Joined: Nov 2002
Posts: 913
Berlin, Germany
S
SchokoKeks Offline OP
User
SchokoKeks  Offline OP
User
S

Joined: Nov 2002
Posts: 913
Berlin, Germany
Dark_samurai, I've used your testapplication and it still crashes to client on connection, just a second after i'm trying to connect. There seems to be no timeout or similar.

I only changed the adress to connect to. Mine is a bit longer, its 20 characters long, could that be of any problem? I'm using no-ip.com and it works for other games and stuff.

I'm using 3DGS 7.86.2 and ANet 1.3.2.0.

Re: [ANet] Using a hostname to connect to [Re: SchokoKeks] #344416
10/17/10 10:56
10/17/10 10: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
Thanks for the report!

Yes you're right. Because an IP can't be longer than 15 signs, the string was limited to 15 signs. I removed this limit. Now it should work. I've sent you a beta version. Please try it out and tell me if it's working now.


ANet - A stable and secure network plugin with multi-zone, unlimited players, voip, server-list features,... (for A7/A8)!
get free version
Re: [ANet] Using a hostname to connect to [Re: Dark_samurai] #344459
10/17/10 16:37
10/17/10 16:37
Joined: Nov 2002
Posts: 913
Berlin, Germany
S
SchokoKeks Offline OP
User
SchokoKeks  Offline OP
User
S

Joined: Nov 2002
Posts: 913
Berlin, Germany
Thanks for the fast fix, it works now.
There is a new bug in the password system now, I've send you an email about it.

Re: [ANet] Using a hostname to connect to [Re: SchokoKeks] #344668
10/19/10 14:50
10/19/10 14:50
Joined: Jul 2005
Posts: 1,930
Austria
Dark_samurai Offline
Serious User
Dark_samurai  Offline
Serious User

Joined: Jul 2005
Posts: 1,930
Austria
The password bug is also fixed now.

I think I will release the current beta version after another few days of beta testing.


ANet - A stable and secure network plugin with multi-zone, unlimited players, voip, server-list features,... (for A7/A8)!
get free version
Re: [ANet] Using a hostname to connect to [Re: Dark_samurai] #344671
10/19/10 14:59
10/19/10 14:59
Joined: Jun 2006
Posts: 2,640
Earth
Germanunkol Offline
Expert
Germanunkol  Offline
Expert

Joined: Jun 2006
Posts: 2,640
Earth
Ah, maybe this is the bug I just sent you an email about? If it's already fixed - great! Would you be able to send me the new version? We want to distribute a demo of the game tomorrow and I'd not like to have to disable the password system...


~"I never let school interfere with my education"~
-Mark Twain

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