Cannot connect socket using hostname

Rigsby

Member
Licensed User
Longtime User
Hi,

I just cannot connect a socket using a hostname, IP address is OK.


Socket1.Initialize("Socket1")
Socket1.Connect("192.168.1.2","7", 5000)


will connect....



Socket1.Initialize("Socket1")
Socket1.Connect("user-d2f90b4478","7", 5000)


will not connect....



On the PC I am trying to connect to with an android app, I can run DOS shell, and typing hostname, gives the hostname as above.

I can ping the hostname from any number of connected laptops just fine.

Using catalyst socketwrench in a VB6 app, of which I am trying to duplicate in android b4a, I can connect to the server program using either the hostname or the IP address no problem.

using the android b4a app, just will not connect using hostname, it will not resolve to an IP and connect.

No firewalls running.

I would attach the app, but it literally is just those 2 lines of code.

Any help appreciated etc.

Rigsby.
 

Rigsby

Member
Licensed User
Longtime User
The VB6 program runs on the same computer?
This is a DNS issue. Your router doesn't seem to resolve the host name.


The VB6 apps are dotted around on 5 different laptops. All of these laptops can ping the Server computer with that host-name. All 5 laptops have the vb app and can access using either IP or hostname.

Androids OK with IP but not hostname.

very strange.
 
Upvote 0

Rigsby

Member
Licensed User
Longtime User
I downloaded an app called ping & dns.

It does exactly the same - so I agree it is not a b4a problem :)

A simple network and Windows is just fine, android is junk.

Cheers, Rigsby.
 
Upvote 0
Top