6

I want to know about Qt's implementation of QTcpSocket's ReadyRead signal. How is it implemented on Windows and on Linux? Using select(), poll(), epoll(), SIGIO or any other way? How does QTcpSocket know when to emit a ReadyRead signal?

sashoalm
  • 75,001
  • 122
  • 434
  • 781
rick
  • 119
  • 1
  • 3
  • Hi, I deleted the second part of your question, I hope it's not a problem. You should post it as a separate question instead. – sashoalm May 13 '13 at 15:45

1 Answers1

2

Since Qt is open-source, you can look at the source code directly, and see for yourself.

They even have it posted online.

The OS-specific parts are (I think) implemented in qnativesocketengine_unix.cpp and in qnativesocketengine_win.cpp.

waynix
  • 501
  • 3
  • 13
sashoalm
  • 75,001
  • 122
  • 434
  • 781
  • I'm pretty sure you won't find answers in the code for Linux, since it seems to be integrated into the gtk+ eventloop and use whatever gtk+ uses. – Janick Bernet Jun 18 '13 at 13:56
  • 2
    FYI, Qt has nothing at all with GTK+ eventloop – evilruff Jun 19 '15 at 11:58
  • So where is the place (line numbers)? You gave an answer and many people read it. It's more efficient if someone searches once... (yeah, on it) – IceFire Mar 11 '23 at 06:38