PDA

View Full Version : QT socket non blocking mode



Pereubu2018
15th August 2018, 17:10
Is there any way to put qt sockets in blocking or non blocking mode? Are they in default in non blocking mode. Do qt needs to have blocking or non blocking sockets because it already puts this in a kind of non blocking functionality by using signal and slots?

wysota
16th August 2018, 07:41
For performance reasons sockets should be non-blocking. Otherwise this blocks the event loop and freezes the UI. You can make them pseudo-blocking by using the family of waitFor* methods.