Struct socket_config_handlers_t

Struct Documentation

struct socket_config_handlers_t

A struct to hold handlers for configuring a socket at various stages of its creation.

Each handler is called with the currently open socket file descriptor, and should return true if the operation was successful

Public Members

std::function<bool(int)> pre_bind = {}

Handler to be run before binding the socket.

std::function<bool(int)> pre_connect = {}

Handler to be run before connecting the socket.

std::function<bool(int)> post_connect = {}

Handler to be run after connecting the socket.