public void run () {
		try {
			// handle authentication process.
			if (version == 0 && useAuth) {
				// Access Authenticator instance
				//Authenticator auth = Authenticator.getInstance();
				// authenticate (to) server
				//userCred = auth.authenticate (comm, false, null);
				if (userCred == null)
					throw new Exception ("authentication failed!");
				SecureChannel secureCh = userCred.getSecureChannel ();
				if (secureCh != null && secureCh.isSecured()) {
					System.out.println ("Switching on channel security...");
					comm.wrapWith (secureCh);
				}
			}
			
			if (version == 2) {
				// start with version negotiation.
				Type.Version peer = handler.negotiateVersion ("9P2000", 2048+23);
				System.out.println (peer.version + ", msize=" + peer.msize);
				
				// start authentication
				userCred = handler.authenticate ("test", "");
			}
		}
		catch (Exception e) {
			System.err.println ("[StyxClient] exception caught -- " + e.getMessage());
			return;
		}
	}