Hi, bax.
I just complete my npc find path problem with the bug fixed Java API.
but i find some new problem.
the java simulate npc sometimes will lost connect automatic.
And the java output "Connection Lost."
Zhulp
Best regards.
the Shinezone() team.
About Java API to simulate Openspace npc problem.
How did you set the <MaxUserIdleTime>?
As regards the empty extension message, I mean something like this:
java code:
where smartFox is an instance of the SmartFoxClient class
This is sufficient to keep the user alive and on the server side you can completely ignore the request.
As regards the empty extension message, I mean something like this:
java code:
Code: Select all
smartFox.sendXtMessage("gameExt", "ping", new SFSObject());
where smartFox is an instance of the SmartFoxClient class
This is sufficient to keep the user alive and on the server side you can completely ignore the request.
ddk2,
your idle time is set to 300 seconds (MaxUserIdleTime config parameter). If your NPC doesn't send requests to SmartFoxServer within that time period, it gets disconnected.
In order to avoid a disconnection, you can send a fake request to your extension, just like in the Lapo's example.
your idle time is set to 300 seconds (MaxUserIdleTime config parameter). If your NPC doesn't send requests to SmartFoxServer within that time period, it gets disconnected.
In order to avoid a disconnection, you can send a fake request to your extension, just like in the Lapo's example.
Paolo Bax
The SmartFoxServer Team
The SmartFoxServer Team
Sorry, but I don't understand (for example, why do you say "extend"? the name is "extension").
Are you saying that your java client which simulates an NPC always sends a path to the users within the MaxUserIdleTime?
If no, this could be the reason for disconnection, because the NPC is idle.
If yes, then it shouldn't be disconnected, because when sending the new path to the other clients you are (I suppose) both setting the user variables and sending an object. These two are enough to keep the connection alive.
Are you saying that your java client which simulates an NPC always sends a path to the users within the MaxUserIdleTime?
If no, this could be the reason for disconnection, because the NPC is idle.
If yes, then it shouldn't be disconnected, because when sending the new path to the other clients you are (I suppose) both setting the user variables and sending an object. These two are enough to keep the connection alive.
Paolo Bax
The SmartFoxServer Team
The SmartFoxServer Team
bax wrote:Sorry, but I don't understand (for example, why do you say "extend"? the name is "extension").
Are you saying that your java client which simulates an NPC always sends a path to the users within the MaxUserIdleTime?
If no, this could be the reason for disconnection, because the NPC is idle.
If yes, then it shouldn't be disconnected, because when sending the new path to the other clients you are (I suppose) both setting the user variables and sending an object. These two are enough to keep the connection alive.
Yes, I mean the "extends" is the extension.
And I the npc send the new path to other clients is within idle time.
And I mean the npc will lost connection sometimes suddenly.
ddk2 wrote:I find one way to course that:
Java simulate NPC in Openspace will lost connect when the room user who is the Client of swf all is left.
the Java simulate NPC will lost connection.
that is one way to touch.
And I think there is some other way to touch it.
Can you explain a bit better or to provide the debug log. I've tried several tests with both java and swf clients and I was not able to reproduce issue where a java client is disconnected when swf client leaves the room.
Return to “Java2SE / Android Client API”
Who is online
Users browsing this forum: No registered users and 19 guests