[vlc-devel] Patch: accelerate net_Connect

Kiran Kotla kotlakiran at gmail.com
Sat Aug 27 02:36:44 CEST 2011

Hello vlc-devel maintainers,

       Here is a patch that makes the net_Connect function connect
to the fastest server attempting to connect to multiple servers from
DNS resolution in parallel by making the sockets non-blocking and
using select to choose the best among them. We call this new
mechanism 'smart connect'. It also stores the fastest server from the
previous resolution of a DNS name into a cache (with a configurable timeout)
and connects to it directly without performing DNS resolution.

      Both these features (smart connect and cache) can either be enabled
or disabled by the #defines in the source code SMART_CONNECT and

      The source code changes were thoroughly tested with and without
enabling the #defines and it works as expected.

      The patch file is attached. We would appreciate any comments or
suggestions on the changes described.

      Could you please integrate this change or let me know what process you
would prefer I follow to get this optimization integrated?

Thanks in advance.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.videolan.org/pipermail/vlc-devel/attachments/20110826/fea14005/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: vlc-smartconnect.diff
Type: application/octet-stream
Size: 13762 bytes
Desc: not available
URL: <http://mailman.videolan.org/pipermail/vlc-devel/attachments/20110826/fea14005/attachment.obj>

More information about the vlc-devel mailing list