cancel
Showing results for 
Search instead for 
Did you mean: 

non blocking socket: GUI hangs

Former Member
0 Kudos

Hello,

i have made a swing based GUI. It sends a request to the local server and the server keep sending response to it.

Basically request is sent once, but response is in the form of stream.

But my problem is that GUI hangs after getting the response from the server, because the socket is still getting the reponse. how can I get rid of this problem?

regards,

Saurabh

Accepted Solutions (0)

Answers (2)

Answers (2)

former_member184385
Active Participant
0 Kudos

Hi Saurabh,

Tom is right, threads are the way. There is even a dedicated swing api (as far as i can remember), which lets you exec. lengthy tasks in a tread and be notified (the gui) when the task quits.

Regards

Gregor

TomVanDoo
Active Contributor
0 Kudos

work with threads

When using network functionalities you should always use separate threads.