Blitz (34/213)

From:Rick Hodger
Date:5 May 2000 at 20:14:17
Subject:Re: Rob's TCP/IP Lib problem

I watched as Rob Hutchinson hammered "Re: Rob's TCP/IP Lib problem" out on
their keyboard...

>> For some, unknown, reason...Rob's TCP/IP lib has started behaving a
>> little strangly. And not just in the program I made, it's happening in
>> the examples as well...even after I reinstalled the lib!

> Oh god... BUGZ.. :(

Yup....don't you just love them? :)

>> What happens, is if connecting to a remote host (eg. 194.46.20.130, my
>> machine in work) it works fine. However, if I try to connect to localhost
>> (127.0.0.1) the TCPConnectSocket command automatically returns a "-4" no
>> matter what I do. If I ignore the -4 and carry on, it works fine (as it
>> has actually connected), but that means if someone types in an IP address
>> that *doesn't* exist....it crashs with a "GURU 1111 emulator" error.
>>
>> Any ideas? Anyone?

> Have you tried connecting to your REAL IP?

Nope, and I'll tell you why. You have two interfaces, one is your
"loopback" address and one is your "actual" address. In the standard
Miami, that's your "lo0" and "mi0" interfaces. When you connect to the
internet, the TCP/IP stack detects that the address isn't on your machine,
and goes to the external interface (mi0)....when you connect to either your
own mi0 address or the loopback address, it treats them both as loopback
addresses. It never looks at routers, gateways or DNS servers. So I would
expect the same result.

> Cos the easy way to get around this would be to check if the user enters
> 127.0.0.1 or LOCALHOST and then get the real ip with TCPGetOwnHostID()
> or whatever its called :)... Provided it works with your IP?

But that's a *nasty* way to do it :/

Anyway, if it isn't happening to anyone else, it must be something I've
installed in Blitz :/



+-------------+-----------------------+----------------------+
| Rick Hodger | rick@thehub.u-net.com | rick@pagan-games.com |
+-------------+-----+-----------------+----------------------+
| *SimpleFTP v2.22* | http://www.thehub.u-net.com |
+-------------------+---------+------------------------------+
| /Founder of Pagan Software/ | http://www.pagan-games.com/ |
+------------------------------------------------------------+
The new baby is like royalty, he's the prince of wails.

---------------------------------------------------------------------
To unsubscribe, e-mail: blitz-list-unsubscribe@netsoc.ucd.ie
For additional commands, e-mail: blitz-list-help@netsoc.ucd.ie