Hi, there thanks for reply
I've read the BOSH session attachment with Strophe.
js in chapter 12.
I'm glad that Strophe supporting this feature :) That's very helpful. But when I try to implement connecting with session attachment, I've got some problem with the RID.
I'm using Openfire server. I did my pre-binding system and SID & RID maintenance from my server side code. Every time I go to my page, I'm requesting the latest RID form my pre-bind service and increment it by 1 (RID = RID + 1).
There's no problem when I'm doing session attachment for the first time. But when I refreshed the page or open the new tab a problem occurred with this error message
POST http://myopenfireserver/http-bind/ 404 (Invalid SID.)
Now I'm realizing that every time a request occurred, Strophe will automatically increment its RID by 1.
For example, let's say my first RID from PHP-prebind service is:
123456.
Then I'm doing session attachment with RID:
123457.
When I'm sending ping IQ, Strophe will automatically request with RID:
123458.
Next when I'm sending presence IQ, Strophe will request with RID:
1234569
In this case my last RID from PHP-prebind service is
123457 and when I refreshed the page, strophe will request with that RID. Seems Openfire won't accepted request with the same RID as previous. Is that right?
This is my screenshot of XHR