Fix signature of lws_create_vhost() in README.coding.md
authorPatrick Gansterer <paroga@paroga.com>
Sun, 14 Aug 2016 10:38:03 +0000 (12:38 +0200)
committerAndy Green <andy@warmcat.com>
Sun, 14 Aug 2016 11:48:59 +0000 (19:48 +0800)
README.coding.md
doc/html/md_README.coding.html

index b4fc811..b53a2e7 100644 (file)
@@ -524,8 +524,7 @@ afterwards to attach one or more vhosts manually.
 ```
        LWS_VISIBLE struct lws_vhost *
        lws_create_vhost(struct lws_context *context,
-                        struct lws_context_creation_info *info,
-                        struct lws_http_mount *mounts);
+                        struct lws_context_creation_info *info);
 ```
 
 lws_create_vhost() uses the same info struct as lws_create_context(),
index b17b8a4..0964220 100644 (file)
@@ -223,7 +223,7 @@ Client connections as HTTP[S] rather than WS[S]</h1>
 <h1><a class="anchor" id="vhosts"></a>
 Using lws vhosts</h1>
 <p>If you set LWS_SERVER_OPTION_EXPLICIT_VHOSTS options flag when you create your context, it won't create a default vhost using the info struct members for compatibility. Instead you can call <a class="el" href="group__context-and-vhost.html#ga0c54c667ccd9b8b3dddcd123ca72f87c">lws_create_vhost()</a> afterwards to attach one or more vhosts manually.</p>
-<div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno">    1</span>&#160;LWS_VISIBLE struct lws_vhost *</div><div class="line"><a name="l00002"></a><span class="lineno">    2</span>&#160;lws_create_vhost(struct lws_context *context,</div><div class="line"><a name="l00003"></a><span class="lineno">    3</span>&#160;                 struct lws_context_creation_info *info,</div><div class="line"><a name="l00004"></a><span class="lineno">    4</span>&#160;                 struct lws_http_mount *mounts);</div></div><!-- fragment --><p><a class="el" href="group__context-and-vhost.html#ga0c54c667ccd9b8b3dddcd123ca72f87c">lws_create_vhost()</a> uses the same info struct as <a class="el" href="group__context-and-vhost.html#gaf2fff58562caab7510c41eeac85a8648">lws_create_context()</a>, it ignores members related to context and uses the ones meaningful for vhost (marked with VH in <a class="el" href="libwebsockets_8h.html">libwebsockets.h</a>).</p>
+<div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno">    1</span>&#160;LWS_VISIBLE struct lws_vhost *</div><div class="line"><a name="l00002"></a><span class="lineno">    2</span>&#160;lws_create_vhost(struct lws_context *context,</div><div class="line"><a name="l00003"></a><span class="lineno">    3</span>&#160;                 struct lws_context_creation_info *info);</div></div><!-- fragment --><p><a class="el" href="group__context-and-vhost.html#ga0c54c667ccd9b8b3dddcd123ca72f87c">lws_create_vhost()</a> uses the same info struct as <a class="el" href="group__context-and-vhost.html#gaf2fff58562caab7510c41eeac85a8648">lws_create_context()</a>, it ignores members related to context and uses the ones meaningful for vhost (marked with VH in <a class="el" href="libwebsockets_8h.html">libwebsockets.h</a>).</p>
 <div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno">    1</span>&#160;struct lws_context_creation_info {</div><div class="line"><a name="l00002"></a><span class="lineno">    2</span>&#160;        int port;                                       /* VH */</div><div class="line"><a name="l00003"></a><span class="lineno">    3</span>&#160;        const char *iface;                              /* VH */</div><div class="line"><a name="l00004"></a><span class="lineno">    4</span>&#160;        const struct lws_protocols *protocols;          /* VH */</div><div class="line"><a name="l00005"></a><span class="lineno">    5</span>&#160;        const struct lws_extension *extensions;         /* VH */</div><div class="line"><a name="l00006"></a><span class="lineno">    6</span>&#160;...</div></div><!-- fragment --><p>When you attach the vhost, if the vhost's port already has a listen socket then both vhosts share it and use SNI (is SSL in use) or the Host: header from the client to select the right one. Or if no other vhost already listening the a new listen socket is created.</p>
 <p>There are some new members but mainly it's stuff you used to set at context creation time.</p>
 <h1><a class="anchor" id="sni"></a>