Package cn.com.zjtelecom.smgp.message

Examples of cn.com.zjtelecom.smgp.message.LoginMessage


            || mpackage.ReqestId == RequestId.ActiveTest_Resp
            || mpackage.ReqestId == RequestId.Login) {
          switch (mpackage.ReqestId) {
          case (0x00000001):
            // login
            LoginMessage loginMessage = new LoginMessage(Message);
            // login��Ҫ���������صIJ���
            this.ipaddress = this.clientsocket
                .getRemoteSocketAddress().toString();
            if (this.ipaddress.indexOf("/") == 0) {
              this.ipaddress = this.ipaddress.substring(1);
            }
            if (this.ipaddress.indexOf(":") > 0) {
              this.ipaddress = this.ipaddress.substring(0,
                  this.ipaddress.indexOf(":"));
            }

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

            LoginResult loginresult = this.serversim.onLogin(login,
                this);
View Full Code Here


        System.out.println("Try Reconnect!");
        this.Connect();
        System.out.println("Try Login!");
        // this.resume();
        // Result result = this.Login();
        LoginMessage lm = new LoginMessage(this.ClientID,
            this.ClientPasswd, this.LoginMode);
        SendBuf(lm.getBuf());
        // out.write(lm.getBuf());
        // System.out.println("ErrorCode:"+result.ErrorCode);
        // System.out.println("ErrorDescription:"+result.ErrorDescription);
      } catch (InterruptedException e) {
        // TODO Auto-generated catch block
View Full Code Here

  public synchronized Result Login() {

    Result result = new Result();
    try {
      LoginMessage lm = new LoginMessage(this.ClientID,
          this.ClientPasswd, this.LoginMode);
      SendBuf(lm.getBuf());
      // out.write(lm.getBuf());

      while (this.CurPack == null
          || this.CurPack.ReqestId != RequestId.Login_Resp) {
        try {
View Full Code Here

        System.out.println("Try Reconnect!");
        this.Connect();
        System.out.println("Try Login!");
        // this.resume();
        // Result result = this.Login();
        LoginMessage lm = new LoginMessage(this.ClientID,
            this.ClientPasswd, this.LoginMode);
        SendBuf(lm.getBuf());
       
        // out.write(lm.getBuf());
        // System.out.println("ErrorCode:"+result.ErrorCode);
        // System.out.println("ErrorDescription:"+result.ErrorDescription);
      } catch (InterruptedException e) {
View Full Code Here

       if (this.HasConnect == false) {
         return new Result(-2,"Can not creat socket!");
       }
    Result result = new Result();
    try {
      LoginMessage lm = new LoginMessage(this.ClientID,
          this.ClientPasswd, this.LoginMode);
      SendBuf(lm.getBuf());
      // out.write(lm.getBuf());

      while (this.CurPack == null
          || this.CurPack.ReqestId != RequestId.Login_Resp) {
        try {
View Full Code Here

TOP

Related Classes of cn.com.zjtelecom.smgp.message.LoginMessage

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.