tls_accept_cbs3
Accept an incoming client connection in a tls server
Part of tls_accept_socket(3).
Usage
int
int
int
Overview
After creating a TLS server context tls with tls_server(3) and configuring it with tls_configure(3), a server can accept a new client connection by calling tls_accept_socket() on an already established socket connection.
Alternatively, a new client connection can be accepted over a pair of existing file descriptors by calling tls_accept_fds().
Calling tls_accept_cbs() allows read and write callback functions to handle data transfers. The specified cb_arg parameter is passed back to the functions, and can contain a pointer to any caller-specified data.
All these functions create a new context suitable for reading and writing and return it in *cctx.
Return values
These functions return 0 on success or -1 on error.