Copyright © 2001 - 2005 SILC Project SILC Project Website | SILC Toolkit Reference Manual Index

SILC Toolkit Reference Manual
SILC Core Library
SILC Authentication Interface
SILC Message Interface
SILC Channel Interface
SILC Command Interface
SILC Notify Interface
SILC Status Types
SILC Modes
SILC ID Interface
SILC ID Cache Interface
SILC Argument Interface
SILC Attributes Interface
Packet Protocol Interface
SILC Utility Library
Basic SILC Types
SILC Buffer Interface
SILC Buffer Format Interface
SILC Hash Table Interface
SILC Logging Interface
SILC Memory Interface
SILC Mutex Interface
SILC Thread Interface
SILC Network Interface
SILC Schedule Interface
SILC Socket Interface
SILC Protocol Interface
SILC Config Interface
SILC File Util Interface
SILC String Util Interface
SILC UTF-8 Interface
SILC Stringprep Interface
SILC Util Interface
SILC List Interface
SILC Dynamic List Interface
SILC VCard Interface
SILC Application Utilities
SILC MIME Interface
SILC Crypto Library
Introduction to SILC RNG
SILC RNG Interface
SILC Cipher API
SILC PKCS API
SILC PKCS#1 API
SILC Hash Interface
SILC HMAC Interface
SILC SFTP Library
SILC SFTP Interface
SFTP Filesystems Interface
SILC Client Library
Using SILC Client Library Tutorial
Arguments for command_reply Client Operation
SilcStatus Error Arguments in command_reply Client Operation
Arguments for notify Client Operation
Unicode and UTF-8 Strings in Client Library
Client Library Interface Reference
SILC Key Exchange Library
SILC SKE Interface
SKE Status Types
SKE Diffie Hellman Groups
SKE Payloads
SILC Math Library
SILC MP Interface
SILC Math Interface
Resource Links
SILC Project Website
SILC Protocol Documentation
SILC White Paper
SILC FAQs

SILC Schedule Interface
Header: silcschedule.h
DESCRIPTION

     The SILC Scheduler is the heart of any application. The scheduler provides
     the application's main loop that can handle incoming data, outgoing data,
     timeouts and dispatch different kind of tasks.

     The SILC Scheduler supports file descriptor based tasks, timeout tasks
     and generic tasks. File descriptor tasks are tasks that perform some
     operation over the specified file descriptor. These include network
     connections, for example. The timeout tasks are timeouts that are executed
     after the specified timeout has elapsed. The generic tasks are tasks that
     apply to all registered file descriptors thus providing one task that
     applies to many independent connections.

     The SILC Scheduler is designed to be the sole main loop of the application
     so that the application does not need any other main loop.  However,
     SILC Scheduler does support running the scheduler only once, so that the
     scheduler does not block, and thus providing a possiblity that some
     external main loop is run over the SILC Scheduler. However, these
     applications are considered to be special cases.

     Typical application first initializes the scheduler and then registers
     the very first tasks to the scheduler and then run the scheduler.  After
     the scheduler's run function returns the application is considered to be
     ended.

     On WIN32 systems the SILC Scheduler is too designed to work as the main
     loop of the GUI application. It can handle all Windows messages and
     it dispatches them from the scheduler, and thus makes it possible to
     create GUI applications. The scheduler can also handle all kinds of
     WIN32 handles, this includes sockets created by the SILC Net API routines,
     WSAEVENT handle objects created by Winsock2 routines and arbitrary
     WIN32 HANDLE objects.

     The SILC Scheduler supports multi-threads as well. The actual scheduler
     must be run in single-thread but other threads may register new tasks
     and unregister old tasks.  However, it is enforced that the actual
     task is always run in the main thread.  The scheduler is context based
     which makes it possible to allocate several schedulers for one application.
     Since the scheduler must be run in single-thread, a multi-threaded
     application could be created by allocating own scheduler for each of the
     worker threads.

- SilcSchedule
- SilcTask
- SilcTaskType
- SilcTaskEvent
- SilcTaskPriority
- SilcTaskCallback
- SILC_ALL_TASKS
- SILC_TASK_CALLBACK
- SILC_TASK_CALLBACK_GLOBAL
- silc_schedule_init
- silc_schedule_uninit
- silc_schedule_reinit
- silc_schedule_stop
- silc_schedule
- silc_schedule_one
- silc_schedule_wakeup
- silc_schedule_get_context
- silc_schedule_task_add
- silc_schedule_task_del
- silc_schedule_task_del_by_fd
- silc_schedule_task_del_by_callback
- silc_schedule_task_del_by_context
- silc_schedule_set_listen_fd
- silc_schedule_unset_listen_fd
- silc_schedule_signal_register
- silc_schedule_signal_unregister
- silc_schedule_signal_call

Copyright © 2001 - 2005 SILC Project SILC Project Website | SILC Toolkit Reference Manual Index