Closed abique closed 5 years ago
Also I would suggest an other name for the method:
onFdEvent(int fd, int eventMask)
where eventMask would tell you if there is input available, output can be written, disconnection or error. You can check poll or epoll.
Forget about this one.
I re-open because this interface needs to be either simplified or more advanced:
Can you give me a use case where you register a file descriptor for event handling where the communication is not bidirectional ? Only notifying about readability did not work with GTK.
If you register an fd from epoll_create(), you only need the read I think and then you can have your own fd reactor.
Usually you turn off events for writing and only when you want to write something you first try to write and if you received EWOULDBLOCK then you activate the write event and wait for it to write. If write is always on, then your polling mechanism will always return to tell you "write is ready" even if you don't have anything to write.
Is that correct?
OK, I just rechecked, and there's a bug in the example host which lead me to the conclusion that a notification of writability is needed, but that is not the case. So we will change the documentation that only readability will be notified.
OK Very good, thanks :)
Then I'll implement it as specified in the next days.
https://github.com/steinbergmedia/vst3_pluginterfaces/blob/de91bf4199959f9496cf6d14990fce037435ade5/gui/iplugview.h#L224
Hi, This is likely being called back after a select/poll/epoll reactor. Ideally it should also specify if the fd is ready for read/write, so we can save a poll() to get that information. Alex.