blob: 769a40d2714dfd07d7486396dee707b074fa9ea0 [file] [log] [blame]
<!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.14"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>libguac: guacamole/socket-fntypes.h File Reference</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="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></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="projectalign" style="padding-left: 0.5em;">
<div id="projectname">libguac
&#160;<span id="projectnumber">1.1.0</span>
</div>
</td>
</tr>
</tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.14 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
var searchBox = new SearchBox("searchBox", "search",false,'Search');
/* @license-end */
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(function() {
initMenu('',true,false,'search.php','Search');
$(document).ready(function() { init_search(); });
});
/* @license-end */</script>
<div id="main-nav"></div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
onmouseover="return searchBox.OnSearchSelectShow()"
onmouseout="return searchBox.OnSearchSelectHide()"
onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>
<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0"
name="MSearchResults" id="MSearchResults">
</iframe>
</div>
<div id="nav-path" class="navpath">
<ul>
<li class="navelem"><a class="el" href="dir_6bb9fad85c98b48a11165f494b9f53ce.html">guacamole</a></li> </ul>
</div>
</div><!-- top -->
<div class="header">
<div class="summary">
<a href="#typedef-members">Typedefs</a> </div>
<div class="headertitle">
<div class="title">socket-fntypes.h File Reference</div> </div>
</div><!--header-->
<div class="contents">
<p>Function type definitions related to the <a class="el" href="structguac__socket.html" title="The core I/O object of Guacamole. ">guac_socket</a> object.
<a href="#details">More...</a></p>
<p><a href="socket-fntypes_8h_source.html">Go to the source code of this file.</a></p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="typedef-members"></a>
Typedefs</h2></td></tr>
<tr class="memitem:a75396c8cb7b0ba91102fcd447a1eb36b"><td class="memItemLeft" align="right" valign="top">typedef ssize_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="socket-fntypes_8h.html#a75396c8cb7b0ba91102fcd447a1eb36b">guac_socket_read_handler</a>(<a class="el" href="structguac__socket.html">guac_socket</a> *socket, void *buf, size_t count)</td></tr>
<tr class="memdesc:a75396c8cb7b0ba91102fcd447a1eb36b"><td class="mdescLeft">&#160;</td><td class="mdescRight">Generic read handler for socket read operations, modeled after the standard POSIX read() function. <a href="#a75396c8cb7b0ba91102fcd447a1eb36b">More...</a><br /></td></tr>
<tr class="separator:a75396c8cb7b0ba91102fcd447a1eb36b"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a7198af0a6bbac52794eb248c81d90c6a"><td class="memItemLeft" align="right" valign="top">typedef ssize_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="socket-fntypes_8h.html#a7198af0a6bbac52794eb248c81d90c6a">guac_socket_write_handler</a>(<a class="el" href="structguac__socket.html">guac_socket</a> *socket, const void *buf, size_t count)</td></tr>
<tr class="memdesc:a7198af0a6bbac52794eb248c81d90c6a"><td class="mdescLeft">&#160;</td><td class="mdescRight">Generic write handler for socket write operations, modeled after the standard POSIX write() function. <a href="#a7198af0a6bbac52794eb248c81d90c6a">More...</a><br /></td></tr>
<tr class="separator:a7198af0a6bbac52794eb248c81d90c6a"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a934350207615e0e2066954f9484153f8"><td class="memItemLeft" align="right" valign="top">typedef int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="socket-fntypes_8h.html#a934350207615e0e2066954f9484153f8">guac_socket_select_handler</a>(<a class="el" href="structguac__socket.html">guac_socket</a> *socket, int usec_timeout)</td></tr>
<tr class="memdesc:a934350207615e0e2066954f9484153f8"><td class="mdescLeft">&#160;</td><td class="mdescRight">Generic handler for socket select operations, similar to the POSIX select() function. <a href="#a934350207615e0e2066954f9484153f8">More...</a><br /></td></tr>
<tr class="separator:a934350207615e0e2066954f9484153f8"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a894bc88c6288ee6b6713a2ea64bd05a0"><td class="memItemLeft" align="right" valign="top">typedef ssize_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="socket-fntypes_8h.html#a894bc88c6288ee6b6713a2ea64bd05a0">guac_socket_flush_handler</a>(<a class="el" href="structguac__socket.html">guac_socket</a> *socket)</td></tr>
<tr class="memdesc:a894bc88c6288ee6b6713a2ea64bd05a0"><td class="mdescLeft">&#160;</td><td class="mdescRight">Generic flush handler for socket flush operations. <a href="#a894bc88c6288ee6b6713a2ea64bd05a0">More...</a><br /></td></tr>
<tr class="separator:a894bc88c6288ee6b6713a2ea64bd05a0"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a1b714d65f18d57bb52f929c7d3909526"><td class="memItemLeft" align="right" valign="top">typedef void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="socket-fntypes_8h.html#a1b714d65f18d57bb52f929c7d3909526">guac_socket_lock_handler</a>(<a class="el" href="structguac__socket.html">guac_socket</a> *socket)</td></tr>
<tr class="memdesc:a1b714d65f18d57bb52f929c7d3909526"><td class="mdescLeft">&#160;</td><td class="mdescRight">When set within a <a class="el" href="structguac__socket.html" title="The core I/O object of Guacamole. ">guac_socket</a>, a handler of this type will be called whenever exclusive access to the <a class="el" href="structguac__socket.html" title="The core I/O object of Guacamole. ">guac_socket</a> is required, such as when <a class="el" href="socket_8h.html#a00c8f00ab54c42e42c9f489caf5478b1" title="Marks the beginning of a Guacamole protocol instruction. ">guac_socket_instruction_begin()</a> is called. <a href="#a1b714d65f18d57bb52f929c7d3909526">More...</a><br /></td></tr>
<tr class="separator:a1b714d65f18d57bb52f929c7d3909526"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:af1a6f8eb81522aab289c9f4ed6051d3f"><td class="memItemLeft" align="right" valign="top">typedef void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="socket-fntypes_8h.html#af1a6f8eb81522aab289c9f4ed6051d3f">guac_socket_unlock_handler</a>(<a class="el" href="structguac__socket.html">guac_socket</a> *socket)</td></tr>
<tr class="memdesc:af1a6f8eb81522aab289c9f4ed6051d3f"><td class="mdescLeft">&#160;</td><td class="mdescRight">When set within a <a class="el" href="structguac__socket.html" title="The core I/O object of Guacamole. ">guac_socket</a>, a handler of this type will be called whenever exclusive access to the <a class="el" href="structguac__socket.html" title="The core I/O object of Guacamole. ">guac_socket</a> is no longer required, such as when <a class="el" href="socket_8h.html#a603c23b24e2e2e95eeb2ce08d8115e94" title="Marks the end of a Guacamole protocol instruction. ">guac_socket_instruction_end()</a> is called. <a href="#af1a6f8eb81522aab289c9f4ed6051d3f">More...</a><br /></td></tr>
<tr class="separator:af1a6f8eb81522aab289c9f4ed6051d3f"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a9700a8ba2011d6e6ce13e3e6c6397fc2"><td class="memItemLeft" align="right" valign="top">typedef int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="socket-fntypes_8h.html#a9700a8ba2011d6e6ce13e3e6c6397fc2">guac_socket_free_handler</a>(<a class="el" href="structguac__socket.html">guac_socket</a> *socket)</td></tr>
<tr class="memdesc:a9700a8ba2011d6e6ce13e3e6c6397fc2"><td class="mdescLeft">&#160;</td><td class="mdescRight">Generic handler for the closing of a socket, modeled after the standard POSIX close() function. <a href="#a9700a8ba2011d6e6ce13e3e6c6397fc2">More...</a><br /></td></tr>
<tr class="separator:a9700a8ba2011d6e6ce13e3e6c6397fc2"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p>Function type definitions related to the <a class="el" href="structguac__socket.html" title="The core I/O object of Guacamole. ">guac_socket</a> object. </p>
</div><h2 class="groupheader">Typedef Documentation</h2>
<a id="a894bc88c6288ee6b6713a2ea64bd05a0"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a894bc88c6288ee6b6713a2ea64bd05a0">&#9670;&nbsp;</a></span>guac_socket_flush_handler</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">typedef ssize_t guac_socket_flush_handler(<a class="el" href="structguac__socket.html">guac_socket</a> *socket)</td>
</tr>
</table>
</div><div class="memdoc">
<p>Generic flush handler for socket flush operations. </p>
<p>This function is not modeled after any POSIX function. When set within a <a class="el" href="structguac__socket.html" title="The core I/O object of Guacamole. ">guac_socket</a>, a handler of this type will be called when <a class="el" href="socket_8h.html#ababc834d5812e006b55a79da417bfe12" title="Flushes the write buffer. ">guac_socket_flush()</a> is called.</p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">socket</td><td>The <a class="el" href="structguac__socket.html" title="The core I/O object of Guacamole. ">guac_socket</a> being flushed.</td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>Zero on success, or non-zero if an error occurs during flush. </dd></dl>
</div>
</div>
<a id="a9700a8ba2011d6e6ce13e3e6c6397fc2"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a9700a8ba2011d6e6ce13e3e6c6397fc2">&#9670;&nbsp;</a></span>guac_socket_free_handler</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">typedef int guac_socket_free_handler(<a class="el" href="structguac__socket.html">guac_socket</a> *socket)</td>
</tr>
</table>
</div><div class="memdoc">
<p>Generic handler for the closing of a socket, modeled after the standard POSIX close() function. </p>
<p>When set within a <a class="el" href="structguac__socket.html" title="The core I/O object of Guacamole. ">guac_socket</a>, a handler of this type will be called when the socket is closed.</p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">socket</td><td>The <a class="el" href="structguac__socket.html" title="The core I/O object of Guacamole. ">guac_socket</a> being closed. </td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>Zero on success, or -1 if an error occurs. </dd></dl>
</div>
</div>
<a id="a1b714d65f18d57bb52f929c7d3909526"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a1b714d65f18d57bb52f929c7d3909526">&#9670;&nbsp;</a></span>guac_socket_lock_handler</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">typedef void guac_socket_lock_handler(<a class="el" href="structguac__socket.html">guac_socket</a> *socket)</td>
</tr>
</table>
</div><div class="memdoc">
<p>When set within a <a class="el" href="structguac__socket.html" title="The core I/O object of Guacamole. ">guac_socket</a>, a handler of this type will be called whenever exclusive access to the <a class="el" href="structguac__socket.html" title="The core I/O object of Guacamole. ">guac_socket</a> is required, such as when <a class="el" href="socket_8h.html#a00c8f00ab54c42e42c9f489caf5478b1" title="Marks the beginning of a Guacamole protocol instruction. ">guac_socket_instruction_begin()</a> is called. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">socket</td><td>The <a class="el" href="structguac__socket.html" title="The core I/O object of Guacamole. ">guac_socket</a> to which exclusive access is required. </td></tr>
</table>
</dd>
</dl>
</div>
</div>
<a id="a75396c8cb7b0ba91102fcd447a1eb36b"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a75396c8cb7b0ba91102fcd447a1eb36b">&#9670;&nbsp;</a></span>guac_socket_read_handler</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">typedef ssize_t guac_socket_read_handler(<a class="el" href="structguac__socket.html">guac_socket</a> *socket, void *buf, size_t count)</td>
</tr>
</table>
</div><div class="memdoc">
<p>Generic read handler for socket read operations, modeled after the standard POSIX read() function. </p>
<p>When set within a <a class="el" href="structguac__socket.html" title="The core I/O object of Guacamole. ">guac_socket</a>, a handler of this type will be called when data needs to be read into the socket.</p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">socket</td><td>The <a class="el" href="structguac__socket.html" title="The core I/O object of Guacamole. ">guac_socket</a> being read from. </td></tr>
<tr><td class="paramname">buf</td><td>The arbitrary buffer we must populate with data. </td></tr>
<tr><td class="paramname">count</td><td>The maximum number of bytes to read into the buffer. </td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>The number of bytes read, or -1 if an error occurs. </dd></dl>
</div>
</div>
<a id="a934350207615e0e2066954f9484153f8"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a934350207615e0e2066954f9484153f8">&#9670;&nbsp;</a></span>guac_socket_select_handler</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">typedef int guac_socket_select_handler(<a class="el" href="structguac__socket.html">guac_socket</a> *socket, int usec_timeout)</td>
</tr>
</table>
</div><div class="memdoc">
<p>Generic handler for socket select operations, similar to the POSIX select() function. </p>
<p>When <a class="el" href="socket_8h.html#a41b0d7a25ccda3d0ae20143880cf53b7" title="Waits for input to be available on the given guac_socket object until the specified timeout elapses...">guac_socket_select()</a> is called on a <a class="el" href="structguac__socket.html" title="The core I/O object of Guacamole. ">guac_socket</a>, its guac_socket_select_handler will be invoked, if defined.</p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">socket</td><td>The <a class="el" href="structguac__socket.html" title="The core I/O object of Guacamole. ">guac_socket</a> being selected. </td></tr>
<tr><td class="paramname">usec_timeout</td><td>The maximum number of microseconds to wait for data, or -1 to potentially wait forever. </td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>Positive on success, zero if the timeout elapsed and no data is available, negative on error. </dd></dl>
</div>
</div>
<a id="af1a6f8eb81522aab289c9f4ed6051d3f"></a>
<h2 class="memtitle"><span class="permalink"><a href="#af1a6f8eb81522aab289c9f4ed6051d3f">&#9670;&nbsp;</a></span>guac_socket_unlock_handler</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">typedef void guac_socket_unlock_handler(<a class="el" href="structguac__socket.html">guac_socket</a> *socket)</td>
</tr>
</table>
</div><div class="memdoc">
<p>When set within a <a class="el" href="structguac__socket.html" title="The core I/O object of Guacamole. ">guac_socket</a>, a handler of this type will be called whenever exclusive access to the <a class="el" href="structguac__socket.html" title="The core I/O object of Guacamole. ">guac_socket</a> is no longer required, such as when <a class="el" href="socket_8h.html#a603c23b24e2e2e95eeb2ce08d8115e94" title="Marks the end of a Guacamole protocol instruction. ">guac_socket_instruction_end()</a> is called. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">socket</td><td>The <a class="el" href="structguac__socket.html" title="The core I/O object of Guacamole. ">guac_socket</a> to which exclusive access is no longer required. </td></tr>
</table>
</dd>
</dl>
</div>
</div>
<a id="a7198af0a6bbac52794eb248c81d90c6a"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a7198af0a6bbac52794eb248c81d90c6a">&#9670;&nbsp;</a></span>guac_socket_write_handler</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">typedef ssize_t guac_socket_write_handler(<a class="el" href="structguac__socket.html">guac_socket</a> *socket, const void *buf, size_t count)</td>
</tr>
</table>
</div><div class="memdoc">
<p>Generic write handler for socket write operations, modeled after the standard POSIX write() function. </p>
<p>When set within a <a class="el" href="structguac__socket.html" title="The core I/O object of Guacamole. ">guac_socket</a>, a handler of this type will be called when data needs to be written to the socket.</p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">socket</td><td>The <a class="el" href="structguac__socket.html" title="The core I/O object of Guacamole. ">guac_socket</a> being written to. </td></tr>
<tr><td class="paramname">buf</td><td>The arbitrary buffer containing data to be written. </td></tr>
<tr><td class="paramname">count</td><td>The maximum number of bytes to written to the buffer. </td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>The number of bytes written, or -1 if an error occurs. </dd></dl>
</div>
</div>
</div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.14
</small></address>
</body>
</html>