yev_create_accept_event()

yev_create_accept_event()#

yev_create_accept_event() creates a new accept event associated with the given event loop and callback function.

Prototype

yev_event_h yev_create_accept_event(
    yev_loop_h      yev_loop,
    yev_callback_t  callback,
    hgobj           gobj
);

Parameters

Key

Type

Description

yev_loop

yev_loop_h

The event loop handle in which the accept event will be created.

callback

yev_callback_t

The callback function to be invoked when the event is triggered. If it returns -1, the loop in yev_loop_run() will break.

gobj

hgobj

The associated hgobj object for event handling.


Return Value

Returns a yev_event_h handle to the newly created accept event, or NULL on failure.

Notes

Before starting the accept event, it must be configured using yev_setup_accept_event().

Prototype

// Not applicable in JS

Prototype

# Not applicable in Python
Examples
// TODO C examples
// TODO JS examples
# TODO Python examples