ascii-chat
Binary v0.15.83-53-gb711d8720
Library lib/v0.3.2-701-gb711d8720
Video chat in your terminal
Loading...
Searching...
No Matches
platform_event_stream Struct Reference

The useful part of event write is in request, stream, done, arg: together they describe what is pending, who owns it, and how much data is valid. Keep the object with its parent operation and use the parent cleanup path. More...

Data Fields

bool listener
platform_event_loop_t * owner
uv_tcp_t tcp
uv_timer_t timer
uv_timer_t output_timer
uv_async_t output
uv_mutex_t mutex
struct event_write * first
struct event_write * last
struct event_write * active
struct event_write * recycled
size_t recycled_count
bool zerocopy
platform_event_read_fn read
platform_event_close_fn close
void * arg
size_t queued
platform_event_queue_fn queue_changed
void * queue_context
size_t writes
unsigned handles
bool closing
bool working
bool close_requested
asciichat_error_t requested_reason
asciichat_error_t reason
char input [65536]

Detailed Description

The useful part of event write is in request, stream, done, arg: together they describe what is pending, who owns it, and how much data is valid. Keep the object with its parent operation and use the parent cleanup path.

When code needs to work with platform event loop, it keeps uv, wake, tick, tick_fn here instead of scattering it across globals. Initialization establishes the handles and sizes; teardown must release any allocation, lock, thread, or callback context recorded in those fields.

Definition at line 43 of file event.c.

Field Documentation

◆ active

struct event_write * platform_event_stream::active

Definition at line 51 of file event.c.

Referenced by platform_event_stream_close().

◆ arg

void* platform_event_stream::arg

Definition at line 57 of file event.c.

Referenced by platform_event_stream_start(), and platform_event_stream_write().

◆ close

platform_event_close_fn platform_event_stream::close

Definition at line 56 of file event.c.

Referenced by platform_event_stream_start().

◆ close_requested

bool platform_event_stream::close_requested

Definition at line 65 of file event.c.

Referenced by platform_event_stream_request_close(), and platform_event_stream_write().

◆ closing

◆ first

struct event_write* platform_event_stream::first

Definition at line 51 of file event.c.

Referenced by platform_event_stream_close(), and platform_event_stream_write().

◆ handles

unsigned platform_event_stream::handles

Definition at line 62 of file event.c.

Referenced by platform_event_stream_work().

◆ input

char platform_event_stream::input[65536]

Definition at line 68 of file event.c.

◆ last

struct event_write * platform_event_stream::last

Definition at line 51 of file event.c.

Referenced by platform_event_stream_close(), and platform_event_stream_write().

◆ listener

bool platform_event_stream::listener

Definition at line 44 of file event.c.

◆ mutex

◆ output

uv_async_t platform_event_stream::output

◆ output_timer

uv_timer_t platform_event_stream::output_timer

Definition at line 48 of file event.c.

Referenced by platform_event_stream_close().

◆ owner

platform_event_loop_t* platform_event_stream::owner

Definition at line 45 of file event.c.

◆ queue_changed

platform_event_queue_fn platform_event_stream::queue_changed

◆ queue_context

void* platform_event_stream::queue_context

◆ queued

size_t platform_event_stream::queued

◆ read

platform_event_read_fn platform_event_stream::read

Definition at line 55 of file event.c.

Referenced by platform_event_stream_resume(), and platform_event_stream_start().

◆ reason

asciichat_error_t platform_event_stream::reason

Definition at line 67 of file event.c.

Referenced by platform_event_stream_close().

◆ recycled

struct event_write* platform_event_stream::recycled

Definition at line 52 of file event.c.

Referenced by platform_event_stream_write().

◆ recycled_count

size_t platform_event_stream::recycled_count

Definition at line 53 of file event.c.

Referenced by platform_event_stream_write().

◆ requested_reason

asciichat_error_t platform_event_stream::requested_reason

Definition at line 66 of file event.c.

Referenced by platform_event_stream_request_close().

◆ tcp

◆ timer

uv_timer_t platform_event_stream::timer

Definition at line 47 of file event.c.

Referenced by platform_event_stream_close(), and platform_event_stream_deadline().

◆ working

bool platform_event_stream::working

Definition at line 64 of file event.c.

Referenced by platform_event_stream_work().

◆ writes

size_t platform_event_stream::writes

Definition at line 61 of file event.c.

Referenced by platform_event_stream_close(), and platform_event_stream_write().

◆ zerocopy

bool platform_event_stream::zerocopy

Definition at line 54 of file event.c.

Referenced by platform_event_stream_set_zerocopy(), and platform_event_stream_write().


The documentation for this struct was generated from the following file: