Login
Before wconnect can do anything useful it has
to "Login" to the server. That means open
TCP-connection and verify connectd's at the other
end, supply a username, and perhaps give a
password. While this is going on, wconnect's icon
is a grey circle (
).
Wconnect starts a login when its run, and
whenever it loses the TCP-connection to the server. These
are called Autologins and can be stopped by
unchecking the
As well as automatic logins, it's also posisble to login manually by selecting the menu-option. (Obviosuly if AutoLogins are turned off this is the only way of logging-in.) Please note: manual- and Auto- logins behave slightly differently.
These are the detailed steps in the login process:
Establish a TCP-connection to the server.
Wconnect asks windows to connect to the host and port named in the server-page of wconnect's properties. Failure at this stage is handled in differently.
If its an AutoLogin that fails wconnect doesn't say anything, but it changes its icon to a transparent circle (
) and
goes to sleep. RetryWait seconds later (normally a minute) wconnect begins a new AutoLogin. This process carries on forever.
However when its a manual-login that fails, not only does the icon go transparent but wconnect reports it in a dialog box. If AutoLogins are not enabled then that's it--the dialog only has an okay button and it's upto you to try again. But if AutoLogin's are enabled wconnect will ask whether it should resume contacting the server in the background. Select yes and wconnect acts as if it was an AutoLogin that failed; i.e. it goes to sleep for
RetryWait seconds before beginning another background login--whose failure won't be reported.
For both manual and AutoLogins the error returned by windows is logged to the debug console. The most likely reasons for failure are:
Wait for the server greeting.
Once a TCP-connection between wconnect and connectd is established, wconnect waits for the server's greeting.
The server greeting is a message from connectd saying "Yep, I'm connectd and its okay for you to talk to me". This is the first thing connectd says when it accepts a TCP-connection. Different protocols use different greetings, so if you've connected to the wrong server then wconnect won't understand this message, and will baulk. But some protocols (like http) don't give any greeting. To catch this case wconnect has a GreetingTimeout: the server must respond with within
GreetingTimeout seconds or wconnect decides it's "Not connectd"It's conceivable the greeting timeout could be too short for a genuine server, and the most likely cause is a DNS problem.
Send a username.
Once connectd has sent a greeting it expects the client (wconnect) to identify itself and send a username. (Along with a bunch of options about what wconnect will and won't do.)
The username used is that from the Session-page of wconnect's Properties. By default this is Windows username. When that isn't defined wconnect brings up the login dialog box; as wconnect remembers the last name used to succesfully login that should only happen the first time.
The username terminates at the first colon (:) and anything after that forms the session name. So entering peter:miller means you're logging in as peter
It's upto the server who can login. If it rejects your username, then wconnect will tell you and ask for another one; this goes on till you give up. Once you give up you must manually login--even when AutoLogins are checked.
Send a password.
Some user may need a password and wconnect will always prompt for this. There's a delay while invalid passwords are rejected--this is inserted by the server to impede password crackers. For the same reason the server closes the connection after a few failed attempts; when this happens wconnect tries to restablish the TCP-connection to the server (irregardless of the setting of AutoLogin) and make it appear as if you have an infinite number of password attempts. This can also cause a delay.
Wait for the initial state.
After a succesful login the server sends a bunch of messages listing its configuration, the last of these is a state message: which tells wconnect which icon it needs to display and (as far as wconnect is concerned) terminates the login. There is a timeout associated with this because sooner or later wconnect has got to decide things have gone pair-shaped: if that timeout expires wconnect gives up.
If you click giveup on the login dialog then wconnect will stop any AutoLogins and become inert; AutoLogin remains checked, but you must manually login. When this happens is forced onto wconnect's menu (and that is checked in the properties so will remain on for ever.)
AutoLogins are also not restarted if you select to cancel the in-progress login, or to logoff an attached server.
In both these cases the icon returns to a
transparent circle (
). This
means you can't tell whether the transparent
circle means wconnect is snooring between
AutoLogins or is really "inert". If in doubt ask
wconnect to look for connectd.