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: Websocket status APIs< / 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('group__wsstatus.html','');});
< / script >
< div id = "doc-content" >
< div class = "header" >
< div class = "summary" >
< a href = "#func-members" > Functions< / a > < / div >
< div class = "headertitle" >
< div class = "title" > Websocket status APIs< / div > < / div >
< / div > <!-- header -->
< div class = "contents" >
< table class = "memberdecls" >
< tr class = "heading" > < td colspan = "2" > < h2 class = "groupheader" > < a name = "func-members" > < / a >
Functions< / h2 > < / td > < / tr >
< tr class = "memitem:ga2bb3655329b4651cd06f79ee3a764421" > < td class = "memItemLeft" align = "right" valign = "top" > LWS_VISIBLE LWS_EXTERN int LWS_WARN_UNUSED_RESULT  < / td > < td class = "memItemRight" valign = "bottom" > < a class = "el" href = "group__wsstatus.html#ga2bb3655329b4651cd06f79ee3a764421" > lws_send_pipe_choked< / a > (struct lws *wsi)< / td > < / tr >
< tr class = "separator:ga2bb3655329b4651cd06f79ee3a764421" > < td class = "memSeparator" colspan = "2" >   < / td > < / tr >
< tr class = "memitem:ga08e9ee165fca503fd9427d55cfecac37" > < td class = "memItemLeft" align = "right" valign = "top" > LWS_VISIBLE LWS_EXTERN int  < / td > < td class = "memItemRight" valign = "bottom" > < a class = "el" href = "group__wsstatus.html#ga08e9ee165fca503fd9427d55cfecac37" > lws_is_final_fragment< / a > (struct lws *wsi)< / td > < / tr >
< tr class = "separator:ga08e9ee165fca503fd9427d55cfecac37" > < td class = "memSeparator" colspan = "2" >   < / td > < / tr >
< tr class = "memitem:ga3df5045656dfb6b0e63a38de2dca79d2" > < td class = "memItemLeft" align = "right" valign = "top" > LWS_VISIBLE LWS_EXTERN unsigned char  < / td > < td class = "memItemRight" valign = "bottom" > < a class = "el" href = "group__wsstatus.html#ga3df5045656dfb6b0e63a38de2dca79d2" > lws_get_reserved_bits< / a > (struct lws *wsi)< / td > < / tr >
< tr class = "separator:ga3df5045656dfb6b0e63a38de2dca79d2" > < td class = "memSeparator" colspan = "2" >   < / td > < / tr >
< tr class = "memitem:gaeca4afc94b1f026034f99cbba37e2f85" > < td class = "memItemLeft" align = "right" valign = "top" > LWS_VISIBLE LWS_EXTERN int LWS_WARN_UNUSED_RESULT  < / td > < td class = "memItemRight" valign = "bottom" > < a class = "el" href = "group__wsstatus.html#gaeca4afc94b1f026034f99cbba37e2f85" > lws_partial_buffered< / a > (struct lws *wsi)< / td > < / tr >
< tr class = "separator:gaeca4afc94b1f026034f99cbba37e2f85" > < td class = "memSeparator" colspan = "2" >   < / td > < / tr >
< tr class = "memitem:gaccd9c59336efad8af0554f79cc5966fd" > < td class = "memItemLeft" align = "right" valign = "top" > LWS_VISIBLE LWS_EXTERN int LWS_WARN_UNUSED_RESULT  < / td > < td class = "memItemRight" valign = "bottom" > < a class = "el" href = "group__wsstatus.html#gaccd9c59336efad8af0554f79cc5966fd" > lws_frame_is_binary< / a > (struct lws *wsi)< / td > < / tr >
< tr class = "separator:gaccd9c59336efad8af0554f79cc5966fd" > < td class = "memSeparator" colspan = "2" >   < / td > < / tr >
< tr class = "memitem:ga26a140623d202dd2bf2004deb6994baa" > < td class = "memItemLeft" align = "right" valign = "top" > LWS_VISIBLE LWS_EXTERN int  < / td > < td class = "memItemRight" valign = "bottom" > < a class = "el" href = "group__wsstatus.html#ga26a140623d202dd2bf2004deb6994baa" > lws_is_ssl< / a > (struct lws *wsi)< / td > < / tr >
< tr class = "separator:ga26a140623d202dd2bf2004deb6994baa" > < td class = "memSeparator" colspan = "2" >   < / td > < / tr >
< tr class = "memitem:ga4ad226d5e01024b4046f4a5a37199aa1" > < td class = "memItemLeft" align = "right" valign = "top" > LWS_VISIBLE LWS_EXTERN int  < / td > < td class = "memItemRight" valign = "bottom" > < a class = "el" href = "group__wsstatus.html#ga4ad226d5e01024b4046f4a5a37199aa1" > lws_is_cgi< / a > (struct lws *wsi)< / td > < / tr >
< tr class = "separator:ga4ad226d5e01024b4046f4a5a37199aa1" > < td class = "memSeparator" colspan = "2" >   < / td > < / tr >
< / table >
< a name = "details" id = "details" > < / a > < h2 class = "groupheader" > Detailed Description< / h2 >
< h2 > Websocket connection status APIs< / h2 >
< p > These provide information about ws connection or message status < / p >
< h2 class = "groupheader" > Function Documentation< / h2 >
2016-11-14 18:12:31 +08:00
< a id = "gaccd9c59336efad8af0554f79cc5966fd" > < / a >
< h2 class = "memtitle" > < span class = "permalink" > < a href = "#gaccd9c59336efad8af0554f79cc5966fd" > § < / a > < / span > lws_frame_is_binary()< / h2 >
2016-06-20 17:05:31 +08:00
< div class = "memitem" >
< div class = "memproto" >
< table class = "memname" >
< tr >
< td class = "memname" > LWS_VISIBLE LWS_EXTERN int LWS_WARN_UNUSED_RESULT lws_frame_is_binary < / td >
< td > (< / td >
< td class = "paramtype" > struct lws *  < / td >
< td class = "paramname" > < em > wsi< / em > < / td > < td > )< / td >
< td > < / td >
< / tr >
< / table >
< / div > < div class = "memdoc" >
< p > < code > #include < < a class = "el" href = "libwebsockets_8h.html" > lib/libwebsockets.h< / a > > < / code > < / p >
< p > < a class = "el" href = "group__wsstatus.html#gaccd9c59336efad8af0554f79cc5966fd" > lws_frame_is_binary()< / a > : true if the current frame was sent in binary mode< / p >
< dl class = "params" > < dt > Parameters< / dt > < dd >
< table class = "params" >
< tr > < td class = "paramname" > wsi< / td > < td > the connection we are inquiring about< / td > < / tr >
< / table >
< / dd >
< / dl >
< p > This is intended to be called from the LWS_CALLBACK_RECEIVE callback if it's interested to see if the frame it's dealing with was sent in binary mode. < / p >
< / div >
< / div >
2016-11-14 18:12:31 +08:00
< a id = "ga3df5045656dfb6b0e63a38de2dca79d2" > < / a >
< h2 class = "memtitle" > < span class = "permalink" > < a href = "#ga3df5045656dfb6b0e63a38de2dca79d2" > § < / a > < / span > lws_get_reserved_bits()< / h2 >
2016-06-20 17:05:31 +08:00
< div class = "memitem" >
< div class = "memproto" >
< table class = "memname" >
< tr >
< td class = "memname" > LWS_VISIBLE LWS_EXTERN unsigned char lws_get_reserved_bits < / td >
< td > (< / td >
< td class = "paramtype" > struct lws *  < / td >
< td class = "paramname" > < em > wsi< / em > < / td > < td > )< / td >
< td > < / td >
< / tr >
< / table >
< / div > < div class = "memdoc" >
< p > < code > #include < < a class = "el" href = "libwebsockets_8h.html" > lib/libwebsockets.h< / a > > < / code > < / p >
< p > < a class = "el" href = "group__wsstatus.html#ga3df5045656dfb6b0e63a38de2dca79d2" > lws_get_reserved_bits()< / a > - access reserved bits of ws frame < / p > < dl class = "params" > < dt > Parameters< / dt > < dd >
< table class = "params" >
< tr > < td class = "paramname" > wsi< / td > < td > lws connection < / td > < / tr >
< / table >
< / dd >
< / dl >
< / div >
< / div >
2016-11-14 18:12:31 +08:00
< a id = "ga4ad226d5e01024b4046f4a5a37199aa1" > < / a >
< h2 class = "memtitle" > < span class = "permalink" > < a href = "#ga4ad226d5e01024b4046f4a5a37199aa1" > § < / a > < / span > lws_is_cgi()< / h2 >
2016-06-20 17:05:31 +08:00
< div class = "memitem" >
< div class = "memproto" >
< table class = "memname" >
< tr >
< td class = "memname" > LWS_VISIBLE LWS_EXTERN int lws_is_cgi < / td >
< td > (< / td >
< td class = "paramtype" > struct lws *  < / td >
< td class = "paramname" > < em > wsi< / em > < / td > < td > )< / td >
< td > < / td >
< / tr >
< / table >
< / div > < div class = "memdoc" >
< p > < code > #include < < a class = "el" href = "libwebsockets_8h.html" > lib/libwebsockets.h< / a > > < / code > < / p >
< p > < a class = "el" href = "group__wsstatus.html#ga4ad226d5e01024b4046f4a5a37199aa1" > lws_is_cgi()< / a > - find out if this wsi is running a cgi process < / p > < dl class = "params" > < dt > Parameters< / dt > < dd >
< table class = "params" >
< tr > < td class = "paramname" > wsi< / td > < td > lws connection < / td > < / tr >
< / table >
< / dd >
< / dl >
< / div >
< / div >
2016-11-14 18:12:31 +08:00
< a id = "ga08e9ee165fca503fd9427d55cfecac37" > < / a >
< h2 class = "memtitle" > < span class = "permalink" > < a href = "#ga08e9ee165fca503fd9427d55cfecac37" > § < / a > < / span > lws_is_final_fragment()< / h2 >
2016-06-20 17:05:31 +08:00
< div class = "memitem" >
< div class = "memproto" >
< table class = "memname" >
< tr >
< td class = "memname" > LWS_VISIBLE LWS_EXTERN int lws_is_final_fragment < / td >
< td > (< / td >
< td class = "paramtype" > struct lws *  < / td >
< td class = "paramname" > < em > wsi< / em > < / td > < td > )< / td >
< td > < / td >
< / tr >
< / table >
< / div > < div class = "memdoc" >
< p > < code > #include < < a class = "el" href = "libwebsockets_8h.html" > lib/libwebsockets.h< / a > > < / code > < / p >
< p > < a class = "el" href = "group__wsstatus.html#ga08e9ee165fca503fd9427d55cfecac37" > lws_is_final_fragment()< / a > - tests if last part of ws message < / p > < dl class = "params" > < dt > Parameters< / dt > < dd >
< table class = "params" >
< tr > < td class = "paramname" > wsi< / td > < td > lws connection < / td > < / tr >
< / table >
< / dd >
< / dl >
< / div >
< / div >
2016-11-14 18:12:31 +08:00
< a id = "ga26a140623d202dd2bf2004deb6994baa" > < / a >
< h2 class = "memtitle" > < span class = "permalink" > < a href = "#ga26a140623d202dd2bf2004deb6994baa" > § < / a > < / span > lws_is_ssl()< / h2 >
2016-06-20 17:05:31 +08:00
< div class = "memitem" >
< div class = "memproto" >
< table class = "memname" >
< tr >
< td class = "memname" > LWS_VISIBLE LWS_EXTERN int lws_is_ssl < / td >
< td > (< / td >
< td class = "paramtype" > struct lws *  < / td >
< td class = "paramname" > < em > wsi< / em > < / td > < td > )< / td >
< td > < / td >
< / tr >
< / table >
< / div > < div class = "memdoc" >
< p > < code > #include < < a class = "el" href = "libwebsockets_8h.html" > lib/libwebsockets.h< / a > > < / code > < / p >
< p > < a class = "el" href = "group__wsstatus.html#ga26a140623d202dd2bf2004deb6994baa" > lws_is_ssl()< / a > - Find out if connection is using SSL < / p > < dl class = "params" > < dt > Parameters< / dt > < dd >
< table class = "params" >
< tr > < td class = "paramname" > wsi< / td > < td > websocket connection to check < pre class = "fragment" > Returns 0 if the connection is not using SSL, 1 if using SSL and
using verified cert, and 2 if using SSL but the cert was not
checked (appears for client wsi told to skip check on connection)< / pre > < / td > < / tr >
< / table >
< / dd >
< / dl >
< / div >
< / div >
2016-11-14 18:12:31 +08:00
< a id = "gaeca4afc94b1f026034f99cbba37e2f85" > < / a >
< h2 class = "memtitle" > < span class = "permalink" > < a href = "#gaeca4afc94b1f026034f99cbba37e2f85" > § < / a > < / span > lws_partial_buffered()< / h2 >
2016-06-20 17:05:31 +08:00
< div class = "memitem" >
< div class = "memproto" >
< table class = "memname" >
< tr >
< td class = "memname" > LWS_VISIBLE LWS_EXTERN int LWS_WARN_UNUSED_RESULT lws_partial_buffered < / td >
< td > (< / td >
< td class = "paramtype" > struct lws *  < / td >
< td class = "paramname" > < em > wsi< / em > < / td > < td > )< / td >
< td > < / td >
< / tr >
< / table >
< / div > < div class = "memdoc" >
< p > < code > #include < < a class = "el" href = "libwebsockets_8h.html" > lib/libwebsockets.h< / a > > < / code > < / p >
< p > < a class = "el" href = "group__wsstatus.html#gaeca4afc94b1f026034f99cbba37e2f85" > lws_partial_buffered()< / a > - find out if lws buffered the last write < / p > < dl class = "params" > < dt > Parameters< / dt > < dd >
< table class = "params" >
< tr > < td class = "paramname" > wsi< / td > < td > websocket connection to check< / td > < / tr >
< / table >
< / dd >
< / dl >
< p > Returns 1 if you cannot use lws_write because the last write on this connection is still buffered, and can't be cleared without returning to the service loop and waiting for the connection to be writeable again.< / p >
< p > If you will try to do > 1 lws_write call inside a single WRITEABLE callback, you must check this after every write and bail if set, ask for a new writeable callback and continue writing from there.< / p >
< p > This is never set at the start of a writeable callback, but any write may set it. < / p >
< / div >
< / div >
2016-11-14 18:12:31 +08:00
< a id = "ga2bb3655329b4651cd06f79ee3a764421" > < / a >
< h2 class = "memtitle" > < span class = "permalink" > < a href = "#ga2bb3655329b4651cd06f79ee3a764421" > § < / a > < / span > lws_send_pipe_choked()< / h2 >
2016-06-20 17:05:31 +08:00
< div class = "memitem" >
< div class = "memproto" >
< table class = "memname" >
< tr >
< td class = "memname" > LWS_VISIBLE LWS_EXTERN int LWS_WARN_UNUSED_RESULT lws_send_pipe_choked < / td >
< td > (< / td >
< td class = "paramtype" > struct lws *  < / td >
< td class = "paramname" > < em > wsi< / em > < / td > < td > )< / td >
< td > < / td >
< / tr >
< / table >
< / div > < div class = "memdoc" >
< p > < code > #include < < a class = "el" href = "libwebsockets_8h.html" > lib/libwebsockets.h< / a > > < / code > < / p >
< p > < a class = "el" href = "group__wsstatus.html#ga2bb3655329b4651cd06f79ee3a764421" > lws_send_pipe_choked()< / a > - tests if socket is writable or not < / p > < dl class = "params" > < dt > Parameters< / dt > < dd >
< table class = "params" >
< tr > < td class = "paramname" > wsi< / td > < td > lws connection< / td > < / tr >
< / table >
< / dd >
< / dl >
< p > Allows you to check if you can write more on the socket < / p >
< / div >
< / 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 >