Thread View: borland.public.jbuilder.java.api
1 messages
1 total messages
Started by Lenti
Thu, 09 Jan 2003 21:36
GUI freezing / Socket Server
Author: Lenti
Date: Thu, 09 Jan 2003 21:36
Date: Thu, 09 Jan 2003 21:36
37 lines
1976 bytes
1976 bytes
Here's my problem and I am stumped, partly due to my lack of JAVA
knowledge at the current time. I have an application which starts a
socket server and waits for clients to connect. Once connected, the
server queries XML to the client for display.
My problem is when I start the server my GUI freezes. I have a simple
GUI made in JBuilder with a start button on it. Although the server is
running fine and the application 'works' the GUI freezes and I have to
CTRALTDEL to close the app.
The method below (after message) is in the main Application.java class
and my GUI is being created in the Frame.java class. The Frame class
has a listener for the button press which calls startServer in
Application.
Any suggestions would be helpful.
Thnaks.
public static void startServer() {
try{
int intPort=9999;
ServerSocket server = new ServerSocket(intPort);
System.out.println("Server started...waiting for clients.");
while(true){
Socket objSocket = server.accept();
SocketClient client = new SocketClient(objSocket);
client.start();
}
}
catch(IOException ioe){
//dump error
}
}
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads