Click to See Complete Forum and Search --> : need help with applets


rashu1969
03-04-2005, 11:44 AM
hai to all who wanna help me,

i have a problem with my applet. it is a chat applet. runs with a browser. connects to a server at the backend. i can disconnect from within the applet, but if the browser close button is clicked without signing out, i have problems loggin on again with the same name.

i waana know how to completely disconnect from the server oce the browser window is closed.

any help is appreciated.
thanks in advance

rashu

ccoder
03-04-2005, 02:39 PM
From your description, I can't tell if you can reconnect but can't log back in, or if you simply can't reconnect.

If you can reconnect but can't log in, then the problem is in the server. Did you write the server? If so, how are you handling the login process?

If you can't reconnect, it may be a TIME_WAIT issue. Are you specifying the local port number or letting the system do that? Can you reconnect after about 4 minutes? You can see the connection to the Foreign Address by running netstat from a CMD window. It should go from ESTABLISHED to TIME_WAIT after the browser window is closed.

rashu1969
03-04-2005, 11:15 PM
hey, i do not have problems logging back in, but with another name. if i log baack in with the same name, then i have problems. the system kind of hangs. does applets have some functionality to like completely flush out everything once the browser is closed. does tis have to be specified explicitly.

regards
rashu

ray326
03-04-2005, 11:27 PM
I suspect your problem is the applet is not responding to being shut down by logging out. You need to handle that situation in the applet AND you need to time out your sessions on the chat server, too.