Function imageflow::imageflow_context_send_json [] [src]

#[no_mangle]
pub unsafe extern fn imageflow_context_send_json(context: *mut Context,
                                                 method: *const c_char,
                                                 json_buffer: *const u8,
                                                 json_buffer_size: size_t)
                                                 -> *const JsonResponse

Sends a JSON message to the imageflow_context

The context is provided method, which determines which code path will be used to process the provided JSON data and compose a response.

The function will return NULL if a JSON response could not be allocated (or if some other bug occurred). If a null pointer is returned, consult the standard error methods of context for more detail.

The response can be cleaned up with imageflow_json_response_destroy

Behavior is undefined if context is a null or invalid ptr; segfault likely.