Since you mentioned synchronous, then you should also check whether it is the client (GUI) waiting for the server return that "tends" to freeze (maybe server side) or nothing to do with the server code.
How do I check that?
I have been changing around the code a bit now but then I do get other problems. I have a server class, clienthandler class and a client class(+gui for client).
Server:
Here I have the Serversocket and I start up the client handlers with the code:
All the streaming at the server side is taken care of in the client handler class, i e
The
server crates a new MathNumber and sends this (object) to the client
Then the
client recieves the object, presents it to the user and waits for the user to put in the answer.
The user puts in the answer which is stored in the object and the client sends it back to the server
The
server recieves the mathnumber(that now contains the answer from the user )
The
server calculates the answer and sees if it was false or true and sends that back to the cleint
The
client recieves the result(a boolean) and presents it in a suitable way for the user.
My question here is; on the server side , should it all be handled in the client handler class or should part of this be done in the server, (the first sending of a new mathnumber)?
//Anders