rpm-software-management / librepo

A library providing C and Python (libcURL like) API for downloading packages and linux repository metadata in rpm-md format
http://rpm-software-management.github.io/librepo/
GNU Lesser General Public License v2.1
74 stars 91 forks source link

Network wait API support #264

Closed RishabhSaini closed 1 year ago

RishabhSaini commented 2 years ago

Resolves #259

handle.h: added option for LRO_NETWORK_WAIT and a helper function for handling netowork wait handle.c: Added callback function required for GMainEventLoop and functionality for option handle-py.c: Added the case for LRO_NETWORK_WAIT

Adds API support for waiting on network: This waits for clients network interfaces till the specified time. lr_handle_setopt(priv->repo_handle, error, LRO_NETWORK_WAIT, seconds) This parses metalinkurl/baseurl and polls g_network_monitor_can_reach() in an event driven manner with the help of GMainEventLoop.

RishabhSaini commented 2 years ago

Updated. I have attempted to resolve the availability of nework control. Kindly review the changes.

RishabhSaini commented 1 year ago

@m-blaha Friendly Ping: Hey, when do you think this can be merged by