yev_create_write_event()
#
yev_create_write_event()
creates a write event associated with a given file descriptor and buffer within the specified event loop.
Prototype
yev_event_h yev_create_write_event(
yev_loop_h yev_loop,
yev_callback_t callback,
hgobj gobj,
int fd,
gbuffer_t * gbuf
);
Parameters
Key |
Type |
Description |
---|---|---|
|
|
The event loop in which the write event will be created. |
|
|
The callback function to be invoked when the event is triggered. If it returns -1, |
|
|
The associated GObj instance for event handling. |
|
|
The file descriptor to be monitored for write readiness. |
|
|
The buffer containing data to be written. If |
Return Value
Returns a handle to the newly created write event (yev_event_h
). If creation fails, NULL
is returned.
Notes
The write event monitors the specified file descriptor for write readiness. Use yev_set_gbuffer()
to modify the associated buffer.
Prototype
// Not applicable in JS
Prototype
# Not applicable in Python
Examples
// TODO C examples
// TODO JS examples
# TODO Python examples