Description of MUSHclient world function: world.IsConnected
||Tests to see if the world is connected to the MUD server
View list of data type meanings
This returns TRUE if the world is currently connected.
See GetInfo (227) for more details about the exact connection status.
There are actually a number of connection "phases" because connection is not synchronous. That is, connecting takes time.
If you are using a proxy server, with a username/password, there are 8 phases as described below. Not all phases are necessarily done, for example if the MUD address is already a "dotted decimal" number then a MUD name lookup is not required.
0=not connected (and not attempting to connect)
1=MUD name lookup (converting MUD name to an IP address)
2=Proxy server name lookup (converting proxy server name to an IP address)
3=connecting to MUD (establishing TCP/IP connection to the MUD)
4=connecting to proxy server (establishing TCP/IP connection to the proxy server)
5=proxy server phase 1 (sent SOCKS authentication method, awaiting confirmation)
6=proxy server phase 2 (sent SOCKS username/password, awaiting confirmation)
7=proxy server phase 3 (sent SOCKS connect details, awaiting confirmation
8=connected to MUD (fully connected)
Strictly speaking, IsConnected returns true if the connection phase is 8 (connected to MUD) and false for any other phase.
TRUE if world connected
FALSE if not connected
Note: TRUE is a non-zero value, FALSE is the value 0.
See also ...
||Connects the world to the MUD server
||Disconnects the world from the MUD server
||Returns the number of seconds this world has been connected.
||Gets information about the current world
Search for script function
Enter a word or phrase in the box below to narrow the list down to those that match.
The function name, prototype, summary, and description are searched.
Leave blank to show all functions.
Many functions return a "code" which indicates the success or otherwise
of the function.
view a list of the return codes
The "prototype" part of each function description lists exactly how the function is called (what arguments, if any, to pass to it).
view a list of the data types used in function prototypes
View all functions
Information and images on this site are licensed under the Creative Commons Attribution 3.0 Australia License unless stated otherwise.
Gammon Software support
Forum RSS feed ( https://gammon.com.au/rss/forum.xml )