CTaps 0.3.0
A C implementation of the Transport Services API (RFC 9621 - 9623)
Loading...
Searching...
No Matches
Library Lifecycle

Library initialization, event loop, and shutdown. More...

Functions

int ct_initialize (void)
 Initialize the CTaps library.
 
int ct_start_event_loop (void)
 Start the CTaps event loop (blocking operation).
 
int ct_close (void)
 Close and cleanup the CTaps library.
 

Detailed Description

Library initialization, event loop, and shutdown.

Function Documentation

◆ ct_close()

int ct_close ( void  )

Close and cleanup the CTaps library.

Returns
0 on success, negative error code on failure
See also
ct_initialize() for re-initializing the Library Lifecycle

◆ ct_initialize()

int ct_initialize ( void  )

Initialize the CTaps library.

This function must be called before any other CTaps functions. It initializes the event loop and sets default logging level

Returns
0 on success, negative error code on failure
Note
Must be called before ct_start_event_loop()
This function initializes global state and is not thread-safe
See also
ct_start_event_loop() for starting the event loop after initialization
ct_close() for cleanup and shutdown

◆ ct_start_event_loop()

int ct_start_event_loop ( void  )

Start the CTaps event loop (blocking operation).

Returns
0 on success, negative error code on failure
Note
Must be called after ct_initialize()
All CTaps callbacks are invoked from within this event loop's thread context
Returns when there are no more active and referenced handles
See also
ct_initialize() for Library Lifecycle initialization