[Libwebsockets] Questions when understanding the source code of libwebsocket

Andy Green andy at warmcat.com
Mon Mar 16 23:46:39 CET 2015



On 17 March 2015 01:10:29 GMT+08:00, Jeffrey Zhao <chunyong.zhao at qq.com> wrote:
>Dear Sir
>I have some questions when I am reading through the source code.
>
>
>1. What's the content option [LWS_SERVER_OPTION_LIBEV‍] used for? Could
>you elaborate more on this option? I notice that it is not complied by
>default on Mac.

You can choose to use a generic event loop instead of poll.  If you don't know what it is I doubt you need it.

http://software.schmorp.de/pkg/libev.html

The OPTIONs are there because distros will want to enable all the possible build options to cover all the use-cases, but still individual library users only want the features they want.  So options that affect runtime can be enabled at runtime.

>2. What's the extension used for websocket? I have read through RFC
>6455, but can't figure out what's the purpose is 'extension' used for,
>Could you elaborate more for 'extension'? Maybe you can provide an
>example on how 'extension' is used.

Typically the compression extensions.  But it is adequately explained in the RFC.

>3. Could you kindly recommend some tutorial documents on cmake? I have
>basic knowledge on autotools(autoconf, automake and libtools).

Have a look in README.build.

-Andy

>
>Thanks in advance.
>
>
>Best Regards.
>Jeffrey.




More information about the Libwebsockets mailing list