[vlc-devel] VLC Lua TCP - poll for incoming text?

Chris Angelico rosuav at gmail.com
Mon Jun 19 02:46:13 UTC 2023


Currently, the vlc.net.poll() function always and only has an infinite
timeout. In an extension, this will result inevitably in a watchdog
timer expiration if the other end of the socket takes more than 10
seconds to respond.

In order to allow an extension to react to signals from another
application, it would be extremely useful to be able to either:

1) Poll without fear of timeout - while inside vlc.net.poll(), the
watchdog is disabled; or
2) Poll with a limit of (say) 5 seconds, resulting in a zero return
and a chance to call vlc.keep_alive(); or
3) Have an extension request notification on fd readability.

Would there be value in having a second parameter to poll() that sets
a timeout, or alternatively, could the poll() function always disable
the watchdog? Lua code runs in its own thread so it shouldn't cause
issues.

I've mainly been testing with VLC 3.0.18 from the Debian repositories,
but just pulled a fresh clone and am tinkering with the sources. Would
be prepared to prepare a patch if approved.

Is there interest in this?

Chris Angelico


More information about the vlc-devel mailing list