KEEL 1.0.0
Minimal C11 HTTP client/server library built on epoll/kqueue/io_uring/poll
Loading...
Searching...
No Matches
Data Structures | Typedefs | Enumerations
tls.h File Reference
#include <keel/allocator.h>
#include <stddef.h>
#include <sys/types.h>
Include dependency graph for tls.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  KlTls
 
struct  KlTlsConfig
 TLS configuration for KlConfig. More...
 

Typedefs

typedef struct KlTls KlTls
 Pluggable TLS session vtable.
 
typedef struct KlTlsCtx KlTlsCtx
 Opaque per-server TLS context (certificates, keys, ciphers). User-owned — KEEL never inspects or modifies this.
 
typedef KlTls *(* KlTlsFactory) (KlTlsCtx *ctx, KlAllocator *alloc)
 Factory creates a per-connection KlTls session from the shared context. Called once per connection slot at server init.
 

Enumerations

enum  KlTlsResult { KL_TLS_OK , KL_TLS_WANT_READ , KL_TLS_WANT_WRITE , KL_TLS_ERROR }
 Result codes for non-blocking TLS operations. More...
 

Typedef Documentation

◆ KlTls

typedef struct KlTls KlTls

Pluggable TLS session vtable.

Users implement this interface to provide TLS (BearSSL, LibreSSL, OpenSSL, rustls-ffi, etc.). One KlTls instance exists per connection slot, pre-allocated at server init and reused via reset() across keep-alive connections.

◆ KlTlsCtx

typedef struct KlTlsCtx KlTlsCtx

Opaque per-server TLS context (certificates, keys, ciphers). User-owned — KEEL never inspects or modifies this.

◆ KlTlsFactory

typedef KlTls *(* KlTlsFactory) (KlTlsCtx *ctx, KlAllocator *alloc)

Factory creates a per-connection KlTls session from the shared context. Called once per connection slot at server init.

Parameters
ctxShared TLS context (certs/keys).
allocAllocator for session resources.
Returns
New TLS session, or NULL on failure.

Enumeration Type Documentation

◆ KlTlsResult

Result codes for non-blocking TLS operations.

Enumerator
KL_TLS_OK 

Operation complete

KL_TLS_WANT_READ 

Need more data from socket

KL_TLS_WANT_WRITE 

Need to flush data to socket

KL_TLS_ERROR 

Fatal error