[Libwebsockets] Please explain what is rx_flow_control , and what is fx flow , and how it is related to binary data

Meir Yanovich meiry242 at gmail.com
Mon Jun 20 10:28:44 CEST 2016


Hello
i want to add support to my server to able handling binary data from client
.
i have only 1 example which is test-echo.c .
i can see the handling of the incoming binary data using LWS_WRITE_BINARY
protocol.
i can see there is some kind of "rx" handling in the code :

case LWS_CALLBACK_RECEIVE:
do_rx:
pss->final = lws_is_final_fragment(wsi);
pss->binary = lws_frame_is_binary(wsi);
lwsl_info("+++ test-echo: RX len %d final %d, pss->len=%d\n",
 len, pss->final, (int)pss->len);

memcpy(&pss->buf[LWS_PRE], in, len);
assert((int)pss->len == -1);
pss->len = (unsigned int)len;
pss->rx += len;

lws_rx_flow_control(wsi, 0);
lws_callback_on_writable(wsi);
break;

how does it all connects ?
also as i side note ,
in test-echo.c i can see there is also the client code included i can't
understand how i start the client from the same file of the server , ( the
server is starting great )
Thanks
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://libwebsockets.org/pipermail/libwebsockets/attachments/20160620/fd86ea1e/attachment.html>


More information about the Libwebsockets mailing list