-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(count):token may be erased by another package with same token
- Loading branch information
Showing
3 changed files
with
32 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
package test; | ||
|
||
import conn.ESNSession; | ||
import conn.ISessionListener; | ||
import packs.PackRespNotification; | ||
import packs.PackResult; | ||
import util.Debug; | ||
|
||
public class CountTest { | ||
public static void main(String[] args)throws Exception { | ||
Debug.debug=true; | ||
ESNSession session=new ESNSession("localhost:3003", "root", "changeMe", 5000, new ISessionListener() { | ||
@Override | ||
public void notificationReceived(PackRespNotification notification) { | ||
System.out.println("new no:"+notification.Content); | ||
} | ||
|
||
@Override | ||
public void sessionLogout(PackResult result) { | ||
|
||
} | ||
}); | ||
for (int i=0;i<100;i++) { | ||
int count = session.countNotifications(0, 100); | ||
System.out.println(i+"$$$$$$$$$$$$$$$$count:" + count); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters