static void on_socket_accepted(void* context, XIO_HANDLE io) { HEADERDETECTIO_CONFIG header_detect_io_config; (void)context; header_detect_io_config.underlying_io = io; XIO_HANDLE header_detect_io = xio_create(headerdetectio_get_interface_description(), &header_detect_io_config); connection = connection_create(header_detect_io, NULL, "1", on_new_session_endpoint, NULL); connection_listen(connection); }
static void on_socket_accepted(void* context, const IO_INTERFACE_DESCRIPTION* interface_description, void* io_parameters) { HEADERDETECTIO_CONFIG header_detect_io_config; TLS_SERVER_IO_CONFIG tls_server_io_config; XIO_HANDLE underlying_io; XIO_HANDLE header_detect_io; (void)context; tls_server_io_config.certificate = cert_buffer; tls_server_io_config.certificate_size = cert_size; tls_server_io_config.underlying_io_interface = interface_description; tls_server_io_config.underlying_io_parameters = io_parameters; underlying_io = xio_create(tls_server_io_get_interface_description(), &tls_server_io_config); header_detect_io_config.underlying_io = underlying_io; header_detect_io = xio_create(headerdetectio_get_interface_description(), &header_detect_io_config); connection = connection_create(header_detect_io, NULL, "1", on_new_session_endpoint, NULL); connection_listen(connection); }