Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
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 Go to previous messageGo to previous message
dolik.rce is currently offline  dolik.rce
Messages: 1789
Registered: August 2008
Location: Czech Republic
Ultimate Contributor

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

 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: WebSockets non blocking mode?
Next Topic: SKYLARK js: I offer that we expanded the UxGet function a little with parameter callback
Goto Forum:
  


Current Time: Sat May 04 22:50:45 CEST 2024

Total time taken to generate the page: 0.02942 seconds