[vlc-devel] [PATCH] 1-of-3: vlc-1.1.0 network poll timeout
    Rémi Denis-Courmont 
    rem at videolan.org
       
    Thu Jul  1 09:54:41 CEST 2010
    
    
  
On Thu, 1 Jul 2010 01:12:07 +0200, Frank Enderle <frank.enderle at anamica.de>
wrote:
> i just want a possibility to detect a timeout without having to change
the
> system defaults. how this is implemented is not my priority. i just need
a
> solution.. and i'd like to use one whcich is built in vlc so i don't have
> to patch the source for this purpose.. however changing the system
defaults
> might have an impact on other running applications which also use
keepalive
> sockets. is that that uncommon? 
On the receiving side, you'd have to have a definition of the "timeout".
There is no such thing in HTTP (at least in general), where it is perfectly
valid, and in some case, even legitimate, to not receive any data for a
long period of time. You cannot detect something that does not exist, so
that's all.
On the sending side, timeouts are built-in by TCP. If you want to detect
dead peers even when not sending, then you have two solutions:
 - application-layer ping/noops (depends on the protocol, not possible for
HTTP),
 - TCP keep-alives (SO_KEEPALIVE at the API level).
-- 
Rémi Denis-Courmont
http://www.remlab.net
http://fi.linkedin.com/in/remidenis
    
    
More information about the vlc-devel
mailing list