Home » U++ Library support » U++ MT-multithreading and servers » How to create sockets that don't block the GUI?
Re: How to create sockets that don't block the GUI? [message #39482 is a reply to message #39480] |
Thu, 21 March 2013 06:57 |
|
Alexander_Ag wrote on Wed, 20 March 2013 21:28 |
lectus wrote on Fri, 07 December 2012 16:38 | So far I was able to communicate between sockets, but my problem is that when there's intensive processing the GUI locks and I can't interact with it.
I'd like to have a socket in a while(1) loop while having the GUI fully functional.
Any ideas?
|
Very interesting topic - can anyone give a sample code with GUI that use TcpSocket as server, i just begin work around sockets.
For example http://www.ultimatepp.org/reference$SocketServer$en-us.html but with GUI.
|
It works the same way as any other time consuming process. You just have to make sure that you call Ctrl::ProcessEvents() from time to time to update the GUI. In case of sockets you might want to lower the timeout, so the loop executes faster and call ProcessEvents in each iteration.
Alternatively, use two separate threads...
Best regards,
Honza
|
|
|
|
|
How to create sockets that don't block the GUI?
By: lectus on Fri, 07 December 2012 13:38
|
|
|
Re: How to create sockets that don't block the GUI?
By: Zbych on Fri, 07 December 2012 13:48
|
|
|
Re: How to create sockets that don't block the GUI?
By: lectus on Fri, 07 December 2012 13:53
|
|
|
Re: How to create sockets that don't block the GUI?
By: Zbych on Fri, 07 December 2012 14:06
|
|
|
Re: How to create sockets that don't block the GUI?
By: lectus on Fri, 07 December 2012 14:06
|
|
|
Re: How to create sockets that don't block the GUI?
|
|
|
Re: How to create sockets that don't block the GUI?
By: lectus on Fri, 07 December 2012 16:00
|
|
|
Re: How to create sockets that don't block the GUI?
|
|
|
Re: How to create sockets that don't block the GUI?
By: lectus on Fri, 07 December 2012 19:28
|
|
|
Re: How to create sockets that don't block the GUI?
|
|
|
Re: How to create sockets that don't block the GUI?
|
|
|
Re: How to create sockets that don't block the GUI?
|
|
|
Re: How to create sockets that don't block the GUI?
By: jlh67 on Mon, 17 February 2014 09:51
|
|
|
Re: How to create sockets that don't block the GUI?
|
|
|
Re: How to create sockets that don't block the GUI?
By: jlh67 on Mon, 17 February 2014 17:52
|
|
|
Re: How to create sockets that don't block the GUI?
|
|
|
Re: How to create sockets that don't block the GUI?
By: jlh67 on Tue, 18 February 2014 21:19
|
|
|
Re: How to create sockets that don't block the GUI?
|
|
|
Re: How to create sockets that don't block the GUI?
By: jlh67 on Wed, 19 February 2014 18:07
|
|
|
Re: How to create sockets that don't block the GUI?
By: MrSarup on Tue, 20 December 2016 13:02
|
Goto Forum:
Current Time: Sat May 04 22:50:45 CEST 2024
Total time taken to generate the page: 0.02942 seconds
|