RoyceWindsor1
Feb 21st, 2002, 12:55 PM
I have a signed applet setup to "listen" for a command on a certain port. The code works fine until the user hits the "refresh" button in the browser (testing in IE6). Here's how the code is set up:
public class CTIListener extends java.applet.Applet {
public void init() {
}
public void start() {
if (sockListen == null) listen();
}
public void stop() {
if (sockListen != null) {
try {
sockListen.close();
sockListen = null;
} catch(IOException e) {
}
}
}
public void dispose() {
if (sockListen != null) {
try {
sockListen.close();
sockListen = null;
} catch(IOException e) {
}
}
}
public void listen() {
// Opens server socket and calls Accept method
}
}
The initial call to listen() comes from the init() method of another applet on the same page.
When the brower is refreshed, I get an error saying "Address already in use." What could be happening?
John
public class CTIListener extends java.applet.Applet {
public void init() {
}
public void start() {
if (sockListen == null) listen();
}
public void stop() {
if (sockListen != null) {
try {
sockListen.close();
sockListen = null;
} catch(IOException e) {
}
}
}
public void dispose() {
if (sockListen != null) {
try {
sockListen.close();
sockListen = null;
} catch(IOException e) {
}
}
}
public void listen() {
// Opens server socket and calls Accept method
}
}
The initial call to listen() comes from the init() method of another applet on the same page.
When the brower is refreshed, I get an error saying "Address already in use." What could be happening?
John