Results 1 to 2 of 2

Thread: QT socket non blocking mode

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Jul 2018
    Qt products
    Unix/X11 Windows

    Default QT socket non blocking mode

    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?

  2. #2
    Join Date
    Jan 2006
    Warsaw, Poland
    Thanked 5,012 Times in 4,791 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits

    Default Re: QT socket non blocking mode

    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.
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.

Similar Threads

  1. Replies: 2
    Last Post: 9th January 2018, 22:59
  2. Replies: 1
    Last Post: 23rd April 2014, 10:03
  3. Replies: 1
    Last Post: 7th March 2012, 21:34
  4. Replies: 2
    Last Post: 22nd May 2011, 21:31
  5. Replies: 1
    Last Post: 2nd November 2009, 12:02

Tags for this Thread


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.