2016-06-20 17:05:31 +08:00
|
|
|
<!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"/>
|
2016-11-14 18:12:31 +08:00
|
|
|
<meta name="generator" content="Doxygen 1.8.12"/>
|
|
|
|
<meta name="viewport" content="width=device-width, initial-scale=1"/>
|
2016-06-20 17:05:31 +08:00
|
|
|
<title>libwebsockets: Libwebsockets API introduction</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 -->
|
2016-11-14 18:12:31 +08:00
|
|
|
<!-- 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>
|
2016-06-20 17:05:31 +08:00
|
|
|
</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('index.html','');});
|
|
|
|
</script>
|
|
|
|
<div id="doc-content">
|
|
|
|
<div class="header">
|
|
|
|
<div class="headertitle">
|
|
|
|
<div class="title">Libwebsockets API introduction </div> </div>
|
|
|
|
</div><!--header-->
|
|
|
|
<div class="contents">
|
|
|
|
<div class="textblock"><p>Libwebsockets covers a lot of interesting features for people making embedded servers or clients</p>
|
|
|
|
<ul>
|
|
|
|
<li>http(s) serving and client operation</li>
|
|
|
|
<li>ws(s) serving and client operation</li>
|
|
|
|
<li>http(s) apis for file transfer and upload</li>
|
|
|
|
<li>http POST form handling (including multipart)</li>
|
|
|
|
<li>cookie-based sessions</li>
|
|
|
|
<li>account management (including registration, email verification, lost pw etc)</li>
|
|
|
|
<li>strong ssl PFS support (A+ on SSLlabs test)</li>
|
|
|
|
</ul>
|
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-16 07:37:43 +08:00
|
|
|
<p>You can browse by api category <a href="modules.html">here</a></p>
|
|
|
|
<p>A collection of READMEs for build, coding, lwsws etc are <a href="pages.html">here</a> </p>
|
2016-06-20 17:05:31 +08:00
|
|
|
</div></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">
|
2016-11-14 18:12:31 +08:00
|
|
|
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.12 </li>
|
2016-06-20 17:05:31 +08:00
|
|
|
</ul>
|
|
|
|
</div>
|
|
|
|
</body>
|
|
|
|
</html>
|