[Libwebsockets] libwebsocket_callback_on_writable

Andy Green andy at warmcat.com
Tue Apr 22 02:59:01 CEST 2014



On 22 April 2014 09:39:29 GMT+09:00, "Julio A. Becerra" <julioabg at gmail.com> wrote:
>I am new to libwebsockets and I have a question I couldn't solve yet.
>
>Since we have to call libwebsocket_callback_on_writable in order to
>request
>a callback when the socket is able to be written, is it possible to
>remove
>this request when we don't need to write on the socket for a while?
>I.e.,
>saving CPU cycles.
>
>I guess there should be a trivial way to do it, besides implementing
>your
>own custom functions.

Sorry not sure I get your point.

If you do not request the callback when writeable, no cpu cycles will be burned.

When something happens that you want to write something, only call it then to get that job done.

There's no need to keep calling it forever when there's nothing to send.

'Andy

>
>------------------------------------------------------------------------
>
>_______________________________________________
>Libwebsockets mailing list
>Libwebsockets at ml.libwebsockets.org
>http://ml.libwebsockets.org/mailman/listinfo/libwebsockets




More information about the Libwebsockets mailing list