Package cn.com.zjtelecom.smgp.message

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


        in.read(Message);

        this.LastActiveTime = DateUtil.getTimeStampL();
        // debug
        // System.out.println(Hex.rhex(Message));
        Package mpackage = new Package(Message);

        // ���ò���
        int SequenceId = mpackage.SequenceId;

        if (this.hasLogin || mpackage.ReqestId == RequestId.ActiveTest
View Full Code Here


          this.LogFile.flush();
        }

        // System.out.println("Recevice:"+Hex.rhex(Message));

        this.CurPack = new Package(Message);
        if (this.DisplayMode >= 2)
          DisplayPackage(PackLen, Message, 0);
        switch (this.CurPack.ReqestId) {
        case 0x00000004: // ActiveTest
          SendBuf((new ActiveTestRespMessage()).getBuf());
View Full Code Here

    this.Logout = 1;
    try {
      SendBuf(em.getBuf());

      long sendTime = getTimeStamp();
      Package tmppack = new Package();
      while ((getTimeStamp() - sendTime) < 60000
          && ((tmppack = checkPackage(0, RequestId.Exit_Resp)) != null)) {
        try {
          synchronized (this) {
            wait(60000);
View Full Code Here

  }

  private Package checkPackage(int seq, int reqid) {
    // System.out.println("PackNum:"+ this.undoPack.size());
    for (int i = 0; i < this.undoPack.size(); i++) {
      Package pk = (Package) this.undoPack.get(i);

      if (pk.SequenceId == seq && pk.ReqestId == reqid) {
        this.undoPack.remove(i);
        return pk;
      }
View Full Code Here

          this.LogFile.flush();
        }

        // System.out.println("Recevice:"+Hex.rhex(Message));

        this.CurPack = new Package(Message);
        if (this.DisplayMode >= 2)
          DisplayPackage(PackLen, Message, 0);
        switch (this.CurPack.ReqestId) {
        case 0x00000004: // ActiveTest
          SendBuf((new ActiveTestRespMessage()).getBuf());
View Full Code Here

    this.Logout = 1;
    try {
      SendBuf(em.getBuf());

      long sendTime = getTimeStamp();
      Package tmppack = new Package();
      while ((getTimeStamp() - sendTime) < 60000
          && ((tmppack = checkPackage(0, RequestId.Exit_Resp)) != null)) {
        try {
          synchronized (this) {
            wait(60000);
View Full Code Here

    /*
     * while ((getTimeStamp() - sendTime) < 60000 && (this.CurPack == null
     * || this.CurPack.ReqestId != RequestId.Submit_Resp ||
     * this.CurPack.SequenceId != tmpseq)) {
     */
    Package tmppack = new Package();
    while ((getTimeStamp() - sendTime) < 60000
        && ((tmppack = checkPackage(tmpseq, RequestId.Submit_Resp)) == null)) {
      // checkPackage(int, int)
      try {
        synchronized (this) {
View Full Code Here

  }

  private Package checkPackage(int seq, int reqid) {
    // System.out.println("PackNum:"+ this.undoPack.size());
    for (int i = 0; i < this.undoPack.size(); i++) {
      Package pk = (Package) this.undoPack.get(i);

      if (pk.SequenceId == seq && pk.ReqestId == reqid) {
        this.undoPack.remove(i);
        return pk;
      }
View Full Code Here

TOP

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

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.