CApi

@link("unit") @extern
object CApi
class Object
trait Matchable
class Any
CApi.type

Type members

Types

type add_port_t = CFuncPtr2[Ptr[nxt_unit_ctx_t], Ptr[nxt_unit_port_t], CInt]
type close_handler_t = CFuncPtr1[Ptr[nxt_unit_request_info_t], Unit]
type data_handler_t = CFuncPtr1[Ptr[nxt_unit_request_info_t], Unit]
type nxt_unit_buf_t = CStruct3[Ptr[CChar], Ptr[CChar], Ptr[CChar]]
type nxt_unit_ctx_t = CStruct2[Ptr[Byte], Ptr[nxt_unit_t]]
type nxt_unit_field_t = CStruct6[CShort, Byte, Byte, CInt, nxt_unit_sptr_t, nxt_unit_sptr_t]
type nxt_unit_init_t = CStruct11[Ptr[Byte], Ptr[Byte], CInt, CInt, CInt, nxt_unit_callbacks_t, nxt_unit_port_t, CInt, nxt_unit_port_t, nxt_unit_port_t, CInt]
type nxt_unit_port_id_t = CStruct3[pid_t, CInt, CShort]
type nxt_unit_port_t = CStruct4[nxt_unit_port_id_t, Int, Int, Ptr[Byte]]
type nxt_unit_request_info_t = CStruct12[Ptr[nxt_unit_t], Ptr[nxt_unit_ctx_t], Ptr[nxt_unit_port_t], Ptr[Byte], Ptr[nxt_unit_buf_t], Ptr[nxt_unit_response_t], Ptr[nxt_unit_buf_t], CInt, Ptr[nxt_unit_buf_t], CLongLong, CInt, Ptr[Byte]]
type nxt_unit_response_t = CStruct6[CLongInt, CInt, CInt, CShort, nxt_unit_sptr_t, nxt_unit_field_t]
type nxt_unit_t = CStruct1[Ptr[Byte]]
type nxt_unit_websocket_frame_t = CStruct6[Ptr[nxt_unit_request_info_t], CLongInt, Ptr[nxt_websocket_header_t], Ptr[Byte], Ptr[nxt_unit_buf_t], CLongLong]
type nxt_websocket_header_t = CStruct8[Byte, Byte, Byte, Byte, Byte, Byte, Byte, CArray[Byte, _8]]
type port_recv_t = CFuncPtr1[Ptr[nxt_unit_request_info_t], Unit]
type port_send_t = CFuncPtr1[Ptr[nxt_unit_request_info_t], Unit]
type quit_t = CFuncPtr1[Ptr[nxt_unit_ctx_t], Unit]
type remove_pid_t = CFuncPtr1[Ptr[nxt_unit_request_info_t], Unit]
type remove_port_t = CFuncPtr2[Ptr[nxt_unit_t], Ptr[nxt_unit_port_t], Unit]
type request_handler_t = CFuncPtr1[Ptr[nxt_unit_request_info_t], Unit]
type shm_ack_handler_t = CFuncPtr1[Ptr[nxt_unit_request_info_t], Unit]
type websocket_handler_t = CFuncPtr1[Ptr[nxt_unit_websocket_frame_t], Unit]

Value members

Concrete methods

def nxt_unit_buf_send(buf: Ptr[nxt_unit_buf_t]): CInt
def nxt_unit_done(ctx: Ptr[nxt_unit_ctx_t]): CInt
def nxt_unit_log(ctx: Ptr[nxt_unit_ctx_t], level: Int, fmt: CString): Unit
def nxt_unit_request_done(req: Ptr[nxt_unit_request_info_t], rc: CInt): Unit
def nxt_unit_request_read(req: Ptr[nxt_unit_request_info_t], dst: Ptr[Byte], size: CSSize): CSSize
def nxt_unit_response_add_content(req: Ptr[nxt_unit_request_info_t], src: CString, size: Int): CInt
def nxt_unit_response_add_field(req: Ptr[nxt_unit_request_info_t], name: CString, name_length: Byte, value: CString, value_length: Int): CInt
def nxt_unit_response_init(req: Ptr[nxt_unit_request_info_t], status: CShort, max_fields_count: CInt, max_fields_size: CInt): CInt
def nxt_unit_response_write_nb(req: Ptr[nxt_unit_request_info_t], start: CString, size: CSSize, min_size: CSSize): CSSize
def nxt_unit_run(ctx: Ptr[nxt_unit_ctx_t]): CInt
def nxt_unit_run_once(ctx: Ptr[nxt_unit_ctx_t]): CInt
def nxt_unit_websocket_read(ws: Ptr[nxt_unit_websocket_frame_t], dest: Ptr[Byte], size: CSSize): CSSize
def nxt_unit_websocket_send(req: Ptr[nxt_unit_request_info_t], opcode: Byte, last: Byte, start: Ptr[Byte], size: CSSize): CInt