updates.
[silc.git] / lib / silcclient / client.c
index 305e9c7df5fed223785f7a7e3264285b904c0129..7f1731dc54ac7589c9490a7ebf31b7c684719d4d 100644 (file)
@@ -148,6 +148,20 @@ void silc_client_run(SilcClient client)
   silc_schedule(client->schedule);
 }
 
+/* Runs the client and returns immeadiately. This function is used when
+   the SILC Client object indicated by the `client' is run under some
+   other scheduler, or event loop or main loop.  On GUI applications,
+   for example this may be desired to use to run the client under the
+   GUI application's main loop.  Typically the GUI application would
+   register an idle task that calls this function multiple times in
+   a second to quickly process the SILC specific data. */
+
+void silc_client_run_one(SilcClient client)
+{
+  /* Run the scheduler once. */
+  silc_schedule_one(client->schedule, 0);
+}
+
 static void silc_client_entry_destructor(SilcIDCache cache,
                                         SilcIDCacheEntry entry)
 {