I am having a problem in the SmartFoxServer Pro 1.6.8. The issue is that when server is running and the clients are connected with it. In the meanwhile if any of the clients internet connection get closed or connection breaks for sometime. The server didn't get notified about that and that causes the whole process go out of synch. Hence please anyone suggest me why its going on and what I can do to notify the server about the user connection lost so that it can reflect it to all the other clients connected to the server. Its affecting our project a lot so please help me
Fun Bobby wrote:try to catch the "userLost" event from a zone-extension in the handleInternalEvent
I have an extension written in java and in that extension there is handleInternalEvent which is having a case for userLost. But there is no call to handleInternalEvent. Then how can I handle userLost in between..
//ieo is the object of InternalEventObject
SmartFoxServer.log.log(Level.INFO, "Internal Event: "+ ieo.getEventName()
+ " recieved in our UserManagementExtension.");
Its not showing any trace.
Please I need a quick solution so please reply asap
I am doing the same that is handling that in handle InternalEvent. Please clarify when net connection gets disconnected then y it doesnot make any request to the server
Yes, everytime a logged-in user gets disconnected (i.e. closing down the browser) 'userLost' internal event should get fired in your zone (root) extension. Note: 'userLost' internal event will not get fired if that user wasn't logged in.
How is your user getting disconnected? And does this happen everytime?
This is happening with the logged users. While testing what we do is
While the game is in progress the and one of the user goes to network Connection and disable the network connection or he simply unplug the network cable or his internet connection breaks. In this case the server is not getting notified about the userLost as the user is not connected to the server now. Please tell a way to get this notification.
Are you getting a "logOut" internal event when that occured?
Note: only one of these internal events, "logOut" or "userLost" would get fired. Both internal events won't get triggered at the same time - only one would.
NO I am not getting any of the internal event. the server is not getting notified about the userLost. The server says that person is online. And it made the server goes out of synch.
I have made a trace for the InternalEvent. Whenever any internalevent fire it shows that. But in this no internal event??
function handleInternalEvent(evt)
{
trace("Received a server event --> " + evt.name);
}
Is yours like that?
Lastly, make sure you're using the up-to-date version of that extension, and you're not using the wrong one. A simple test to ensure your extension is the current one you're working on is to trace a unique message in extension's init() function.
public void handleInternalEvent(InternalEventObject ieo) {
SmartFoxServer.log.log(Level.INFO, "Internal Event: "
+ ieo.getEventName()
+ " recieved in our UserManagementExtension.");
}
The Server I am using is 1.6.8 and I have tried this in 1.6.9 also. The same problem exist there also. The extension is uptodate I have already made it sure.