Copyright © 2001 - 2007 SILC Project
SILC Project Website
SILC Toolkit Reference Manual
Index

SILC Toolkit Reference Manual
SILC Crypto Library
    Introduction to SILC RNG
    SILC RNG Interface
    SILC Cipher API
    SILC PKCS API
    SILC Public Key API
    SILC PKCS #1 API
    SILC Hash Interface
    SILC HMAC Interface
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 Argument Interface
    SILC Attributes Interface
    Packet Engine Interface
    SILC Public Key Payload Interface
SILC Key Exchange Library
    SILC SKE Interface
    SILC Connection Authentication Interface
SILC VCard Library
    SILC VCard Interface
SILC Math Library
    SILC MP Interface
    SILC Math 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
    Client Entry Interface Reference
SILC ASN.1 Library
    SILC ASN.1 Interface
    SILC BER interface
SILC HTTP Library
    SILC HTTP Server Interface
    SILC HTTP PHP Translator
SILC Utility Library
    Basic Types and Definitions
    Data Buffer Interface
    Data Buffer Format Interface
    Hash Table Interface
    Memory Allocation Interface
    Data Stack (memory pool) Interface
    Finite State Machine Interface
    Thread Interface
    Mutual Exclusion Lock Interface
    Condition Variable Interface
    Atomic Operations Interface
    Network (TCP and UDP) Interface
    Scheduler Interface
    Asynchronous Operation Interface
    Abstract Stream Interface
    Socket Stream Interface
    File Descriptor Stream Interface
    File Utility Functions
    String Utility Interface
    Snprintf Interface
    UTF-8 String Interface
    Stringprep Interface
    Utility Functions
    List Interface
    Dynamic List Interface
    MIME Interface
    Time Utility Functions
    Logging Interface
    Config File Interface
SILC Key Repository Library
    SILC SKR Interface
SILC Application Utility Library
    SILC Application Utilities
    SILC ID Cache Interface
SILC SFTP Library
    SILC SFTP Interface
    SFTP Filesystems Interface

Resource Links
SILC Project Website
SILC Protocol Documentation
SILC White Paper
SILC FAQs





silcschedule.html
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 and timeout 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 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.

 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
  • SilcTaskEvent
  • SilcTaskCallback
  • SilcTaskNotifyCb
  • SILC_ALL_TASKS
  • SILC_TASK_CALLBACK
  • silc_schedule_init
  • silc_schedule_uninit
  • silc_schedule_stop
  • silc_schedule
  • silc_schedule_one
  • silc_schedule_wakeup
  • silc_schedule_get_context
  • silc_schedule_set_notify
  • silc_schedule_task_add_fd
  • silc_schedule_task_add_timeout
  • silc_schedule_task_add_signal
  • silc_schedule_task_del
  • silc_schedule_task_del_by_fd
  • silc_schedule_task_del_by_callback
  • silc_schedule_task_del_by_context
  • silc_schedule_task_del_by_all
  • silc_schedule_set_listen_fd
  • silc_schedule_get_fd_events
  • silc_schedule_unset_listen_fd








  • Copyright © 2001 - 2007 SILC Project
    SILC Project Website
    SILC Toolkit Reference Manual
    Index