libwebsockets/doc/html/globals_func.html
Andy Green be9fb919d1 context deprecation
1) This makes lwsws run a parent process with the original permissions.
But this process is only able to respond to SIGHUP, it doesn't do anything
else.

2) You can send this parent process a SIGHUP now to cause it to

 - close listening sockets in existing lwsws processes

 - mark those processes as to exit when the number of active connections
   on the falls to zero

 - spawn a fresh child process from scratch, using latest configuration
   file content, latest plugins, etc.  It can now reopen listening sockets
   if it chooses to, or open different listen ports or whatever.

Notes:

1) lws_context_destroy() has been split into two pieces... the reason for
the split is the first part closes the per-vhost protocols, but since
they may have created libuv objects in the per-vhost protocol storage,
these cannot be freed until after the loop has been run.

That's the purpose of the second part of the context destruction,
lws_context_destroy2().

For compatibility, if you are not using libuv, the first part calls the
second part.  However if you are using libuv, you must now call the
second part from your own main.c after the first part.
2016-12-20 14:37:07 +08:00

417 lines
17 KiB
HTML

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.12"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>libwebsockets: Globals</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtreedata.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<script type="text/javascript">
$(document).ready(initResizable);
</script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
<tbody>
<tr style="height: 56px;">
<td id="projectlogo"><img alt="Logo" src="libwebsockets.org-logo.png"/></td>
<td id="projectalign" style="padding-left: 0.5em;">
<div id="projectname">libwebsockets
</div>
<div id="projectbrief">Lightweight C library for HTML5 websockets</div>
</td>
</tr>
</tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.12 -->
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
$(function() {
initMenu('',false,false,'search.php','Search');
});
</script>
<div id="main-nav"></div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
<div id="nav-tree">
<div id="nav-tree-contents">
<div id="nav-sync" class="sync"></div>
</div>
</div>
<div id="splitbar" style="-moz-user-select:none;"
class="ui-resizable-handle">
</div>
</div>
<script type="text/javascript">
$(document).ready(function(){initNavTree('globals_func.html','');});
</script>
<div id="doc-content">
<div class="contents">
&#160;
<h3><a id="index_l"></a>- l -</h3><ul>
<li>lws_add_http_header_by_name()
: <a class="el" href="group__HTTP-headers-create.html#ga2b36bf44405755ff51c1939303b995a8">libwebsockets.h</a>
</li>
<li>lws_add_http_header_by_token()
: <a class="el" href="group__HTTP-headers-create.html#gaf74adb761b22566ad70004882712dce1">libwebsockets.h</a>
</li>
<li>lws_add_http_header_content_length()
: <a class="el" href="group__HTTP-headers-create.html#gacc76a5babcb4dce1b01b1955aa7a2faf">libwebsockets.h</a>
</li>
<li>lws_add_http_header_status()
: <a class="el" href="group__HTTP-headers-create.html#ga29b7d6d2ddfdbaff3d8b607e7e3151b6">libwebsockets.h</a>
</li>
<li>lws_adopt_socket()
: <a class="el" href="group__sock-adopt.html#gabe71b7462afb21c767bdc67334f305af">libwebsockets.h</a>
</li>
<li>lws_adopt_socket_readbuf()
: <a class="el" href="group__sock-adopt.html#gab2d045df0f81afe00891aaed312d552b">libwebsockets.h</a>
</li>
<li>lws_b64_decode_string()
: <a class="el" href="group__sha.html#ga66316e6a5a0644a09d5a10e919dfdd8d">libwebsockets.h</a>
</li>
<li>lws_b64_encode_string()
: <a class="el" href="group__sha.html#gaf39765e4a3b413efb65e4698b2ec3575">libwebsockets.h</a>
</li>
<li>lws_callback_all_protocol()
: <a class="el" href="group__callback-when-writeable.html#gacf04bbe089f47c971c6408c5efe2ac70">libwebsockets.h</a>
</li>
<li>lws_callback_all_protocol_vhost()
: <a class="el" href="group__callback-when-writeable.html#ga13c984d8c5a44a745fd02bc2fba36053">libwebsockets.h</a>
</li>
<li>lws_callback_on_writable()
: <a class="el" href="group__callback-when-writeable.html#ga941caaa468bc507b1cae52275f58800d">libwebsockets.h</a>
</li>
<li>lws_callback_on_writable_all_protocol()
: <a class="el" href="group__callback-when-writeable.html#gabbe4655c7eeb3eb1671b2323ec6b3107">libwebsockets.h</a>
</li>
<li>lws_callback_on_writable_all_protocol_vhost()
: <a class="el" href="group__callback-when-writeable.html#ga8570860e191b62db264f2bac67354ea8">libwebsockets.h</a>
</li>
<li>lws_callback_vhost_protocols()
: <a class="el" href="group__callback-when-writeable.html#ga60939cf0c073d933fde3d17f3591caf5">libwebsockets.h</a>
</li>
<li>lws_cancel_service()
: <a class="el" href="group__service.html#ga53e3d0801dfda7960a7249dd559e68a2">libwebsockets.h</a>
</li>
<li>lws_cancel_service_pt()
: <a class="el" href="group__service.html#ga29c246707997ab7a466aa709aecd2d7b">libwebsockets.h</a>
</li>
<li>lws_canonical_hostname()
: <a class="el" href="group__net.html#gad0df22db2be9fc65a667a1e83f9a92a4">libwebsockets.h</a>
</li>
<li>lws_cgi()
: <a class="el" href="libwebsockets_8h.html#af52923473c59e643a974d65e12290831">libwebsockets.h</a>
</li>
<li>lws_cgi_kill()
: <a class="el" href="libwebsockets_8h.html#a27bb0b3cdcd0af839c928c253b521ff4">libwebsockets.h</a>
</li>
<li>lws_cgi_write_split_stdout_headers()
: <a class="el" href="libwebsockets_8h.html#a5326d3402af8429a166dd991dc65c4a2">libwebsockets.h</a>
</li>
<li>lws_chunked_html_process()
: <a class="el" href="group__html-chunked-substitution.html#ga643073f918c0a7016b690aae9793fd60">libwebsockets.h</a>
</li>
<li>lws_client_connect()
: <a class="el" href="group__client.html#ga4af0a20108a95e8b6d94dd4d80055ff3">libwebsockets.h</a>
</li>
<li>lws_client_connect_extended()
: <a class="el" href="group__client.html#gac6a8558b4410961a880241c2ac1271e2">libwebsockets.h</a>
</li>
<li>lws_client_connect_via_info()
: <a class="el" href="group__client.html#ga0c966136905f467816307cfba6deb5fd">libwebsockets.h</a>
</li>
<li>lws_close_reason()
: <a class="el" href="group__wsclose.html#gaa1c863415d1783cd8de7938aa6efa262">libwebsockets.h</a>
</li>
<li>lws_context_deprecate()
: <a class="el" href="group__context-and-vhost.html#ga1863f0a15ab9da0f07be7bd66230d232">libwebsockets.h</a>
</li>
<li>lws_context_destroy()
: <a class="el" href="group__context-and-vhost.html#ga8ee0314028755f1ddfa9428e09b4fddb">libwebsockets.h</a>
</li>
<li>lws_context_user()
: <a class="el" href="group__context-and-vhost.html#gaeb12f934bfd178bd2132a9e73fc641da">libwebsockets.h</a>
</li>
<li>lws_create_context()
: <a class="el" href="group__context-and-vhost.html#gaf2fff58562caab7510c41eeac85a8648">libwebsockets.h</a>
</li>
<li>lws_create_vhost()
: <a class="el" href="group__context-and-vhost.html#ga0c54c667ccd9b8b3dddcd123ca72f87c">libwebsockets.h</a>
</li>
<li>lws_daemonize()
: <a class="el" href="group__misc.html#gace5171b1dbbc03ec89a98f8afdb5c9af">libwebsockets.h</a>
</li>
<li>lws_email_check()
: <a class="el" href="group__smtp.html#ga5e535e346d92a9daf00be33abf79d4eb">libwebsockets.h</a>
</li>
<li>lws_email_destroy()
: <a class="el" href="group__smtp.html#ga25298a5afc1074e13b2d5711a86432b2">libwebsockets.h</a>
</li>
<li>lws_email_init()
: <a class="el" href="group__smtp.html#ga77fc9b56a1bb39484844981ec375fc29">libwebsockets.h</a>
</li>
<li>lws_ext_parse_options()
: <a class="el" href="group__extensions.html#ga6fb3e2c3dfb9d64dc87026a4e99c128b">libwebsockets.h</a>
</li>
<li>lws_extension_callback_pm_deflate()
: <a class="el" href="group__extensions.html#ga4cdbe42d872e21a448a947714d6c607e">libwebsockets.h</a>
</li>
<li>lws_finalize_http_header()
: <a class="el" href="group__HTTP-headers-create.html#ga4887605ff2242a54db3a7fa01f6f864b">libwebsockets.h</a>
</li>
<li>lws_finalize_startup()
: <a class="el" href="group__Protocols-and-Plugins.html#ga106b37ae9c247e84d191ab09441adc43">libwebsockets.h</a>
</li>
<li>lws_frame_is_binary()
: <a class="el" href="group__wsstatus.html#gaccd9c59336efad8af0554f79cc5966fd">libwebsockets.h</a>
</li>
<li>lws_get_child()
: <a class="el" href="group__misc.html#gacae4d7b6a8d22e4c2d82ff8b12c1e234">libwebsockets.h</a>
</li>
<li>lws_get_context()
: <a class="el" href="group__misc.html#ga0af4f7d2dd375aeedcfa7eb0e1101c4b">libwebsockets.h</a>
</li>
<li>lws_get_count_threads()
: <a class="el" href="group__misc.html#ga629f48268fd1856b54b11172991b97d9">libwebsockets.h</a>
</li>
<li>lws_get_fops()
: <a class="el" href="group__fops.html#gac08aef64c4c34647ed699b24759b6b0e">libwebsockets.h</a>
</li>
<li>lws_get_library_version()
: <a class="el" href="group__misc.html#gac6abfc0b2bd5b2f09281a4432bb2f5f0">libwebsockets.h</a>
</li>
<li>lws_get_mimetype()
: <a class="el" href="group__httpft.html#gab4da87a4800413f15e7aba649fb1d77c">libwebsockets.h</a>
</li>
<li>lws_get_parent()
: <a class="el" href="group__misc.html#ga8930fe36a3f3eefe4a6a4fd499d8e899">libwebsockets.h</a>
</li>
<li>lws_get_peer_addresses()
: <a class="el" href="group__net.html#ga092e5f473b3347f03ffeef8a950080f3">libwebsockets.h</a>
</li>
<li>lws_get_peer_simple()
: <a class="el" href="group__net.html#gad01014fed09759741b6d23afccfdaacc">libwebsockets.h</a>
</li>
<li>lws_get_peer_write_allowance()
: <a class="el" href="group__callback-when-writeable.html#gac4643fe16b0940ae5b68b4ee6195cbde">libwebsockets.h</a>
</li>
<li>lws_get_protocol()
: <a class="el" href="group__Protocols-and-Plugins.html#ga72ad550786ca7976463589d347e62112">libwebsockets.h</a>
</li>
<li>lws_get_random()
: <a class="el" href="group__misc.html#ga58f906c6be0ca80efd813f694569dd4a">libwebsockets.h</a>
</li>
<li>lws_get_reserved_bits()
: <a class="el" href="group__wsstatus.html#ga3df5045656dfb6b0e63a38de2dca79d2">libwebsockets.h</a>
</li>
<li>lws_get_socket_fd()
: <a class="el" href="group__callback-when-writeable.html#gaa709e02a10558753c851e58f1e2c16ba">libwebsockets.h</a>
</li>
<li>lws_get_urlarg_by_name()
: <a class="el" href="group__HTTP-headers-read.html#ga84e9ce5e71a77501a0998ac403a984c2">libwebsockets.h</a>
</li>
<li>lws_get_vhost()
: <a class="el" href="group__context-and-vhost.html#ga06e77ce2916f8bc9826ef8d9d68e3932">libwebsockets.h</a>
</li>
<li>lws_hdr_copy()
: <a class="el" href="group__HTTP-headers-read.html#ga6ce6aa1c0155ea42b7708bed271d1c77">libwebsockets.h</a>
</li>
<li>lws_hdr_copy_fragment()
: <a class="el" href="group__HTTP-headers-read.html#gaa427cad61a9a5e3004afd65c4527b5e9">libwebsockets.h</a>
</li>
<li>lws_hdr_fragment_length()
: <a class="el" href="group__HTTP-headers-read.html#ga594f3d0ece5b09c2ccf9f98ea533bb4e">libwebsockets.h</a>
</li>
<li>lws_hdr_total_length()
: <a class="el" href="group__HTTP-headers-read.html#ga8ade0e1ffb0da7e62b989d8d867bf6c8">libwebsockets.h</a>
</li>
<li>lws_http_client_http_response()
: <a class="el" href="group__client.html#ga715efffc0c4e8fbf72a4293008eb2187">libwebsockets.h</a>
</li>
<li>lws_http_redirect()
: <a class="el" href="group__http.html#ga8fbf01e473ac421fc33ad9f8da8b8a25">libwebsockets.h</a>
</li>
<li>lws_http_transaction_completed()
: <a class="el" href="group__http.html#gad27aed6c66a41b2b89ffe4da2a309e8a">libwebsockets.h</a>
</li>
<li>lws_init_vhost_client_ssl()
: <a class="el" href="group__client.html#ga4f44b8230e6732816ca5cd8d1aaaf340">libwebsockets.h</a>
</li>
<li>lws_interface_to_sa()
: <a class="el" href="group__net.html#ga869d8bdffb0f2a7ce08e3ce10d6be3d8">libwebsockets.h</a>
</li>
<li>lws_is_cgi()
: <a class="el" href="group__wsstatus.html#ga4ad226d5e01024b4046f4a5a37199aa1">libwebsockets.h</a>
</li>
<li>lws_is_final_fragment()
: <a class="el" href="group__wsstatus.html#ga08e9ee165fca503fd9427d55cfecac37">libwebsockets.h</a>
</li>
<li>lws_is_ssl()
: <a class="el" href="group__wsstatus.html#ga26a140623d202dd2bf2004deb6994baa">libwebsockets.h</a>
</li>
<li>lws_json_dump_context()
: <a class="el" href="group__context-and-vhost.html#ga1dce5453d72a2037051aba5410e18135">libwebsockets.h</a>
</li>
<li>lws_json_dump_vhost()
: <a class="el" href="group__context-and-vhost.html#ga94e6cc2223c4eec316b13bcebc3628b6">libwebsockets.h</a>
</li>
<li>lws_json_purify()
: <a class="el" href="group__pur.html#gab15187efcfa256b7c928562c182b92a3">libwebsockets.h</a>
</li>
<li>lws_now_secs()
: <a class="el" href="group__misc.html#ga33bf2635033710b25f931b57ed663e1e">libwebsockets.h</a>
</li>
<li>lws_parse_uri()
: <a class="el" href="group__misc.html#ga1ec0d9faac5d3a5824d765c287c043aa">libwebsockets.h</a>
</li>
<li>lws_partial_buffered()
: <a class="el" href="group__wsstatus.html#gaeca4afc94b1f026034f99cbba37e2f85">libwebsockets.h</a>
</li>
<li>lws_protocol_get()
: <a class="el" href="group__Protocols-and-Plugins.html#ga8bbe5e65faca068845704bab911a5030">libwebsockets.h</a>
</li>
<li>lws_protocol_vh_priv_get()
: <a class="el" href="group__Protocols-and-Plugins.html#gaf3be4243443baac0f8be1fcfb4d25129">libwebsockets.h</a>
</li>
<li>lws_protocol_vh_priv_zalloc()
: <a class="el" href="group__Protocols-and-Plugins.html#gaec0c0477288ff3f83aff38d357b883d1">libwebsockets.h</a>
</li>
<li>lws_remaining_packet_payload()
: <a class="el" href="libwebsockets_8h.html#a72fe65e83b8bb03f904a1a256c673536">libwebsockets.h</a>
</li>
<li>lws_return_http_status()
: <a class="el" href="group__http.html#gac8a4a71240857dc6b2ed70456b6923f4">libwebsockets.h</a>
</li>
<li>lws_rx_flow_allow_all_protocol()
: <a class="el" href="libwebsockets_8h.html#a5e627dbf1db48170ef486edbaf268672">libwebsockets.h</a>
</li>
<li>lws_rx_flow_control()
: <a class="el" href="libwebsockets_8h.html#adf4abd01e8c43f07c6e498ce13590c3e">libwebsockets.h</a>
</li>
<li>lws_send_pipe_choked()
: <a class="el" href="group__wsstatus.html#ga2bb3655329b4651cd06f79ee3a764421">libwebsockets.h</a>
</li>
<li>lws_serve_http_file()
: <a class="el" href="group__httpft.html#gab393a06d3d2722af4c3f8b06842c80d7">libwebsockets.h</a>
</li>
<li>lws_service()
: <a class="el" href="group__service.html#gaf95bd0c663d6516a0c80047d9b1167a8">libwebsockets.h</a>
</li>
<li>lws_service_adjust_timeout()
: <a class="el" href="group__service.html#ga4fd9d714434ca499e2b3f7dbba86f241">libwebsockets.h</a>
</li>
<li>lws_service_fd()
: <a class="el" href="group__service.html#gad82efa5466d14a9f05aa06416375b28d">libwebsockets.h</a>
</li>
<li>lws_service_fd_tsi()
: <a class="el" href="group__service.html#gaebf426eda371ba23642fc11d8e0ace6b">libwebsockets.h</a>
</li>
<li>lws_service_tsi()
: <a class="el" href="group__service.html#ga9b3cc4473fd8848e5bbee7f310712939">libwebsockets.h</a>
</li>
<li>lws_set_allocator()
: <a class="el" href="group__misc.html#gab321ed812f46f6dc7ef9e3ca6f00cf1b">libwebsockets.h</a>
</li>
<li>lws_set_extension_option()
: <a class="el" href="group__extensions.html#gae0e24e1768f83a7fb07896ce975704b9">libwebsockets.h</a>
</li>
<li>lws_set_log_level()
: <a class="el" href="group__log.html#ga244647f9e1bf0097ccdde66d74f41e26">libwebsockets.h</a>
</li>
<li>lws_set_proxy()
: <a class="el" href="group__context-and-vhost.html#ga7e9d5405547a457d86e0b4f0ae2bb1c4">libwebsockets.h</a>
</li>
<li>lws_set_timeout()
: <a class="el" href="group__timeout.html#gaced9f9237f6172fed9f730a2af51345a">libwebsockets.h</a>
</li>
<li>lws_SHA1()
: <a class="el" href="group__sha.html#ga7b09ab74646266f0b555103b3bb8dfe5">libwebsockets.h</a>
</li>
<li>lws_snprintf()
: <a class="el" href="group__misc.html#ga9f37d0e357de2ab4170723fcdb665d21">libwebsockets.h</a>
</li>
<li>lws_spa_create()
: <a class="el" href="group__form-parsing.html#ga162f86762173a2bc8c28497941d74815">libwebsockets.h</a>
</li>
<li>lws_spa_destroy()
: <a class="el" href="group__form-parsing.html#gaaa482f07dad3f04b391cccf0a814e13b">libwebsockets.h</a>
</li>
<li>lws_spa_finalize()
: <a class="el" href="group__form-parsing.html#ga83835bf250ee3d4a60f36a182f2b8d24">libwebsockets.h</a>
</li>
<li>lws_spa_get_length()
: <a class="el" href="group__form-parsing.html#ga3fbe378632f85ec9a14cc2c1687bf05f">libwebsockets.h</a>
</li>
<li>lws_spa_get_string()
: <a class="el" href="group__form-parsing.html#ga2da476217166da02704b90d3a8d4f3cd">libwebsockets.h</a>
</li>
<li>lws_spa_process()
: <a class="el" href="group__form-parsing.html#ga9ad9ebf5ea1a7108415ed7e04cb231d2">libwebsockets.h</a>
</li>
<li>lws_sql_purify()
: <a class="el" href="group__pur.html#ga9cc82f06e5ae7e71458626d7a39a5865">libwebsockets.h</a>
</li>
<li>lws_token_to_string()
: <a class="el" href="group__HTTP-headers-read.html#ga2c0597b2ef1d2cee35736c338bcbd17b">libwebsockets.h</a>
</li>
<li>lws_urldecode()
: <a class="el" href="group__urlendec.html#gaa373a9c16acdd96c395af61ab915ece3">libwebsockets.h</a>
</li>
<li>lws_urlencode()
: <a class="el" href="group__urlendec.html#gabc2888476e50e001c875c1a8abf455b7">libwebsockets.h</a>
</li>
<li>lws_vhost_get()
: <a class="el" href="group__context-and-vhost.html#ga8db03e19a372e34ac25cf21af894a02c">libwebsockets.h</a>
</li>
<li>lws_vhost_name_to_protocol()
: <a class="el" href="group__Protocols-and-Plugins.html#ga25754726d97c5f519d313e691a9fe29d">libwebsockets.h</a>
</li>
<li>lws_write()
: <a class="el" href="group__sending-data.html#gafd5fdd285a0e25ba7e3e1051deec1001">libwebsockets.h</a>
</li>
<li>lws_wsi_user()
: <a class="el" href="group__misc.html#gaa194584fff9698f3b280658f770ccd0f">libwebsockets.h</a>
</li>
<li>lwsl_emit_syslog()
: <a class="el" href="group__log.html#gab7c0fc936cc9f1eb58e2bb234c15147c">libwebsockets.h</a>
</li>
<li>lwsl_hexdump()
: <a class="el" href="group__log.html#ga898b1f03872ad019f507d4e35bbefa90">libwebsockets.h</a>
</li>
<li>lwsl_timestamp()
: <a class="el" href="group__log.html#ga42e39775c6b69b7251bdbf5a2cdd5dcd">libwebsockets.h</a>
</li>
<li>lwsws_get_config_globals()
: <a class="el" href="group__context-and-vhost.html#ga98d88c9080fd89c37114363a6474ea73">libwebsockets.h</a>
</li>
<li>lwsws_get_config_vhosts()
: <a class="el" href="group__context-and-vhost.html#ga341064721add2618ae1b29717493a212">libwebsockets.h</a>
</li>
</ul>
</div><!-- contents -->
</div><!-- doc-content -->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
<ul>
<li class="footer">Generated by
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.12 </li>
</ul>
</div>
</body>
</html>