Package cn.com.zjtelecom.smgp.server.result

Examples of cn.com.zjtelecom.smgp.server.result.LoginResult


    }

    public LoginResult onLogin(Login login) {
      Display.DisplayLogin(login, accountconfig);
      if (accountconfig.getPassword(login.Account) == null) {
        return (new LoginResult(52, "", ServerVersion, ""));
      } else if (Key.checkAuth(login.AuthenticatorClient, login.Account,
          accountconfig.getPassword(login.Account), String
              .valueOf(login.timestamp)) == false) {
        return (new LoginResult(21, "", ServerVersion, ""));
      } else if (!accountconfig.getIpAddress(login.Account).equals(
          login.ipaddress)) {
        return (new LoginResult(20, "", ServerVersion, ""));
      }

      return (new LoginResult(0,
          accountconfig.getPassword(login.Account), ServerVersion,
          accountconfig.getSPNum(login.Account)));
    }
View Full Code Here


  }

  public LoginResult onLogin(Login login,
      ServerHandleConnect serverHandleConnect) {
    LoginResult loginresult = this.serverEventInterface.onLogin(login);
    if (loginresult.getStatus() == 0) {
      this.spnum2Account.put(loginresult.getSpNum(), login.Account + "$"
          + login.ipaddress);
      this.connected(login.Account, login.ipaddress, serverHandleConnect);
    }

    return loginresult;
View Full Code Here

            byte[] AuthenticatorClient = loginMessage
                .getAuthenticatorClient();
            Login login = new Login(loginMessage, this.ipaddress);

            LoginResult loginresult = this.serversim.onLogin(login,
                this);
            LoginRespMessage loginRespMessage = new LoginRespMessage(
                SequenceId, loginresult.getStatus(),
                AuthenticatorClient, loginresult.getShareKey(),
                loginresult.getServerVersion());
            SendBuf(loginRespMessage.getBuf());

            // �����Ѿ�����
            if (loginresult.getStatus() == 0) {

              this.account = login.Account;
              this.hasLogin = true;
              this.setLoginMode(login.LoginMode);
            } else {
View Full Code Here

TOP

Related Classes of cn.com.zjtelecom.smgp.server.result.LoginResult

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.