[Libwebsockets] polling for file descriptor i/o

Per Bothner per at bothner.com
Sun Mar 5 07:50:52 CET 2017


On 03/04/2017 06:34 PM, Per Bothner wrote:
> I'm having problems getting rx flow control to work.  I'll experiment some more.

In  LWS_CALLBACK_RAW_RX_FILE I call lws_rx_flow_control(wsi, 0).,
on the wsi corresponding to the pty fd.
Shortly after, there is a _lws_rx_flow_control which turns off the POLLIN.

In LWS_CALLBACK_SERVER_WRITEABLE, I call lws_rx_flow_control(wsi_child, 1),
where wsi_child is the same wsi corresponding to the pty fd.
Shortly after, there is a _lws_rx_flow_control - but using the *parent* wsi,
the one for LWS_CALLBACK_SERVER_WRITEABLE. Since wsi->rxflow_change_to is not set,
I get a "_lws_rx_flow_control: no pending change message", and nothing changes.

So the POLLIN is never re-enabled.
-- 
	--Per Bothner
per at bothner.com   http://per.bothner.com/



More information about the Libwebsockets mailing list