[vlc-devel] [PATCH 2/2] chromecast: don't close the client connection

Alexandre Janniaux ajanni at videolabs.io
Thu Oct 29 16:10:04 CET 2020


Hi,

Linux based seems to expose the keepalive and the timeout socket
options without any right restriction. However, you need the
admin right whenever you want to change the default value,
but on linux it would probably not even be the case if you have
your own network namespace (I haven't checked though since that
is not relevant for this discussion).

iOS manual doesn't seem to indicate support for timeout, but has
support for keepalive too.
https://developer.apple.com/library/archive/documentation/System/Conceptual/ManPages_iPhoneOS/man2/setsockopt.2.html

On the Windows side, same story, there doesn't seem to be support
for TCP user timeout but you can enable local keepalive with the
setsockopt without rights. If you have the correct rights, you can
setup the default properties in the registry but we don't need this.

I don't know the other exotic systems (OS/2?) but it seems to be
a general case where keepalive is portable and unpriviledged but
the user timeout a bit more specific and tedious. Since we also
emulate the timeout in the httpd server, it could be one solution
to tackle this kind of limitation, though when exactly we would
want to enable this is quite unclear to me right now.

Regards,
--
Alexandre Janniaux
Videolabs

On Thu, Oct 29, 2020 at 04:41:50PM +0200, Rémi Denis-Courmont wrote:
> Le torstaina 29. lokakuuta 2020, 15.28.40 EET Pierre Ynard via vlc-devel a
> écrit :
> > > > Seems it was designed to expect no timeout
> > >
> > > That cannot be achieved with the TCP implementations provided by
> > > the OSes that VLC runs on. *All* of them will fatally time-out the
> > > connection if data remains in the send buffer for too long. (Only
> > > way to avoid this is to write a custom TCP stack, which requires raw
> > > sockets privileges.)
> >
> > Can't you at least raise the TCP timeout value on that socket with
> > setsockopt() and some option? Isn't this just what TCP_USER_TIMEOUT will
> > do?
>
> Does that actually work and is it portable and unprivileged?
>
> --
> 雷米‧德尼-库尔蒙
> http://www.remlab.net/
>
>
>
> _______________________________________________
> vlc-devel mailing list
> To unsubscribe or modify your subscription options:
> https://mailman.videolan.org/listinfo/vlc-devel


More information about the vlc-devel mailing list