Msec_timeout: Maximum time to wait, in miliseconds.Īpplication is recommended to perform graceful shutdown before calling this function (such as unregister the account from the SIP server, terminate presense subscription, and hangup active calls), however, this function will do all of these if it finds there are active sessions that need to be terminated. Negative value indicates error, and application can retrieve the error as (status = -return_value). The number of events that have been handled during the poll. If EpConfig::UaConfig::mainThreadOnly is enabled and this function is called from the main thread (by default the main thread is thread that calls libCreate()), this function will also scan and run any pending jobs in the list. Poll pjsua for events, and if necessary block the caller thread for the specified maximum interval (in miliseconds).Īpplication doesn’t normally need to call this function if it has configured worker thread ( thread_cnt field) in pjsua_config structure, because polling then will be done by these worker threads instead. int libHandleEvents (unsigned msec_timeout ) Note that this function is only applicable for library main & worker threads and external/native threads registered using libRegisterThread(). Name: The optional name to be assigned to the thread.Ĭheck if this thread has been registered to the library. Note that each time this function is called, it will allocate some memory to store the thread description, which will only be freed when the library is destroyed. Register a thread that was created by external or native API to the library. void libRegisterThread ( const string & name ) Note that create() MUST be called before calling this function.Ĭall this function after all initialization is done, so that the library can do additional checking set up.Īpplication may call this function any time after init(). Initialize pjsua with the specified settings.Īll the settings are optional, and the default values will be used when the config is not specified. void libInit ( const EpConfig & prmEpConfig ) Once this function has returned success, application must call libDestroy() before quitting. Version libVersion ( ) constĪpplication must call this function before calling any other functions, to make sure that the underlying libraries are properly initialized.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |