20 #ifndef BUS_INTERNAL_TYPES_H
21 #define BUS_INTERNAL_TYPES_H
27 #include <openssl/ssl.h>
28 #include <openssl/err.h>
63 #define BUS_NO_SSL ((SSL *)-2)
98 #define TIMEOUT_NOT_YET_SET ((time_t)(-1))
129 #define LISTENER_MSG_TAG 0x15
132 #define DEF_FD_SET_SIZE2 4
time_t timeout_sec
Message send timeout.
bus_sink_cb_res_t( bus_sink_cb)(uint8_t *read_buf, size_t read_size, void *socket_udata)
int64_t largest_wr_seq_id_seen
Set by client thread.
bus_msg_result_t result
Result message, constructed in place after the request/response cycle has completed or failed due to ...
pthread_mutex_t fd_set_lock
bus_unexpected_msg_cb * unexpected_msg_cb
bool * joined
Which threads have joined.
SSL * ssl
SSL handle. Must be valid or BUS_NO_SSL.
bus_unpack_cb * unpack_cb
Message unpacking callback.
struct listener ** listeners
Listener array.
shutdown_state_t shutdown_state
Current shutdown state.
Internal threadpool state.
struct timeval tv_send_start
Event timestamps to track timeouts.
struct threadpool * threadpool
Thread pool.
bus_unpack_cb_res_t( bus_unpack_cb)(void *msg, void *socket_udata)
void * udata
User data for callbacks.
uint8_t listener_count
Number of listeners.
bus_error_cb * error_cb
Error handling callback.
SSL_CTX * ssl_ctx
SSL context.
void * udata
user connection data
void( bus_msg_cb)(bus_msg_result_t *res, void *udata)
SSL * ssl
valid pointer or BUS_BOXED_MSG_NO_SSL
bus_msg_cb * cb
Callback and userdata to which the bus_msg_result_t above will be sunk.
pthread_t * threads
Threads.
Per-socket connection context.
void( bus_log_cb)(log_event_t event, int log_level, const char *msg, void *udata)
struct timeval tv_send_done
bus_sink_cb * sink_cb
IO sink callback.
void( bus_unexpected_msg_cb)(void *msg, int64_t seq_id, void *bus_udata, void *socket_udata)
struct yacht * fd_set
Locked hash table for fd -> connection_info.
int fd
Destination filename and message body.
bus_log_cb * log_cb
Logging callback.
void( bus_error_cb)(bus_unpack_cb_res_t result, void *socket_udata)