• Welcome to Valhalla Legends Archive.
 

Connecting with BNLS

Started by EviL_MarinE, October 24, 2004, 06:12 AM

Previous topic - Next topic

Newby

Quote from: bethra on October 29, 2004, 10:00 PM
Hi

what is the IP for bnls.valhallalegends.com?

I am currently trying to move away from VB and make a bot in C++.  I can't seem to connect to bnls under the "bnls.valhallalegends.com" address.

I've been looking at other simple C++ bots and how they connect and it shows it connecting to BNET with its IP address instead of "useast.battle.net".


Resolve the domain name to an IP. I suggest you look up WSAAsyncGetHostByName().

(GetHostByName() IIRC will work as well, but WSAAsync is a better bet.)
- Newby

Quote[17:32:45] * xar sets mode: -oooooooooo algorithm ban chris cipher newby stdio TehUser tnarongi|away vursed warz
[17:32:54] * xar sets mode: +o newby
[17:32:58] <xar> new rule
[17:33:02] <xar> me and newby rule all

Quote<TehUser> Man, I can't get Xorg to work properly.  This sucks.
<torque> you should probably kill yourself
<TehUser> I think I will.  Thanks, torque.

MyndFyre

As I understand it, WSAAsyncXxx does not actually perform true asynchronous communications.
QuoteEvery generation of humans believed it had all the answers it needed, except for a few mysteries they assumed would be solved at any moment. And they all believed their ancestors were simplistic and deluded. What are the odds that you are the first generation of humans who will understand reality?

After 3 years, it's on the horizon.  The new JinxBot, and BN#, the managed Battle.net Client library.

Quote from: chyea on January 16, 2009, 05:05 PM
You've just located global warming.

Zakath

That is correct. It's only emulated, but it works well enough.

I don't use WSAAsyncGetHostByName(), though...the normal gethostbyname() has always worked for me.
Quote from: iago on February 02, 2005, 03:07 PM
Yes, you can't have everybody...contributing to the main source repository.  That would be stupid and create chaos.

Opensource projects...would be dumb.

Minux

#18
Quote from: MyndFyre on October 30, 2004, 04:58 PM
As I understand it, WSAAsyncXxx does not actually perform true asynchronous communications.

http://support.microsoft.com/default.aspx?scid=kb;en-us;156749

[Edit]
A good way to find the IP of a domain is to open your command console and type
ping www.valhallalegends.com or ping bnls.valhallalegends.com
[/Edit]

MyndFyre

Quote from: Minus on October 30, 2004, 07:24 PM
Quote from: MyndFyre on October 30, 2004, 04:58 PM
As I understand it, WSAAsyncXxx does not actually perform true asynchronous communications.

http://support.microsoft.com/default.aspx?scid=kb;en-us;156749

So smart guy...  Do you realize that the KB article you gave here appies to 16-bit Windows?

Quote
Winsock Applications that issue a WSAAsyncGetHostByName() against MS real mode TCP/IP Winsock.dll receive IP address in reverse order

A Winsock application such as Internet Explorer 2.01 or Netscape 2.02 running on Windows 3.1 with MS real mode TCP/IP stack will fail to connect a remote host when the application issues a WSAAsyncGetHostByName() to resolve the remote host name to IP address. For example, WSAAsyncGetHostByName() will return "99.88.77.66" if the remote host IP address is "66.77.88.99".
(emphasis mine).

Since all of our computers nowadays use IE 2.01 on Windows 3.1, and we definitely link to 16-bit Winsock.dll as opposed to ws2_32.dll....
QuoteEvery generation of humans believed it had all the answers it needed, except for a few mysteries they assumed would be solved at any moment. And they all believed their ancestors were simplistic and deluded. What are the odds that you are the first generation of humans who will understand reality?

After 3 years, it's on the horizon.  The new JinxBot, and BN#, the managed Battle.net Client library.

Quote from: chyea on January 16, 2009, 05:05 PM
You've just located global warming.

Zakath

You're the one who posted the link

Minus, I would almost call that a flame: don't do that again
Quote from: iago on February 02, 2005, 03:07 PM
Yes, you can't have everybody...contributing to the main source repository.  That would be stupid and create chaos.

Opensource projects...would be dumb.

Minux

Quote from: Zakath on October 30, 2004, 10:06 PM
You're the one who posted the link

Minus, I would almost call that a flame: don't do that again

Why what are you talking about Sir Zakath?

Zakath

Way to delete your flame before my reply went through. Good thing we've got something called browser caching.

Quote from: iago on February 02, 2005, 03:07 PM
Yes, you can't have everybody...contributing to the main source repository.  That would be stupid and create chaos.

Opensource projects...would be dumb.

Skywing

You should use getaddrinfo() if it's available.  The best option is to create a dedicated thread to do DNS lookups, with the thread using getaddrinfo if the local Winsock supports it, or gethostbyname if there is no IPv6 support available.