libwebsockets
Lightweight C library for HTML5 websockets
Loading...
Searching...
No Matches
lws_io_ops Struct Reference

#include <lws-io-ops.h>

Collaboration diagram for lws_io_ops:

Data Fields

int(* want_write )(struct lws *wsi)
int(* want_read )(struct lws *wsi, int on)
void(* deadline )(struct lws_context *cx, int tsi, lws_usec_t us)
void(* close )(struct lws *wsi)

Detailed Description

Definition at line 41 of file lws-io-ops.h.

Field Documentation

◆ want_write

int(* lws_io_ops::want_write) (struct lws *wsi)

the wsi's transport connection should be written when it can take bytes: IO will call the wsi's writeable handling then. wsi is the connection with the transport (a mux parent, not its stream). Called with the wsi's service thread lock held. 0 = ok

Definition at line 42 of file lws-io-ops.h.

◆ want_read

int(* lws_io_ops::want_read) (struct lws *wsi, int on)

feed (on) or stop feeding (off) the wsi's rx from its transport. Called with the wsi's service thread lock held. 0 = ok

Definition at line 47 of file lws-io-ops.h.

◆ deadline

void(* lws_io_ops::deadline) (struct lws_context *cx, int tsi, lws_usec_t us)

the earliest deadline on service thread tsi moved to us (an absolute lws_now_usecs() time): sansIO must be serviced by then. A deadline that is cancelled is not announced; a wake that finds nothing due is harmless. May be NULL: the built-in event loops ask what is due each time round instead.

Definition at line 50 of file lws-io-ops.h.

◆ close

void(* lws_io_ops::close) (struct lws *wsi)

the wsi is done with its transport: release it (tls session, fd, its place in the poll set). Called from the wsi's close path with the context and vhost locks held.

Definition at line 56 of file lws-io-ops.h.


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