PageRenderTime 41ms CodeModel.GetById 15ms app.highlight 20ms RepoModel.GetById 1ms app.codeStats 1ms

/src/middleware/enet/docs/group__peer.html

https://bitbucket.org/vivkin/gam3b00bs/
HTML | 374 lines | 357 code | 16 blank | 1 comment | 0 complexity | 9ca521212cd1dd9528258489821681b4 MD5 | raw file
  1<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  2<html xmlns="http://www.w3.org/1999/xhtml">
  3<head>
  4<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
  5<title>enet: ENet peer functions</title>
  6<link href="tabs.css" rel="stylesheet" type="text/css"/>
  7<link href="doxygen.css" rel="stylesheet" type="text/css"/>
  8</head>
  9<body>
 10<!-- Generated by Doxygen 1.7.1 -->
 11<div class="navigation" id="top">
 12  <div class="tabs">
 13    <ul class="tablist">
 14      <li><a href="index.html"><span>Main&nbsp;Page</span></a></li>
 15      <li><a href="pages.html"><span>Related&nbsp;Pages</span></a></li>
 16      <li><a href="modules.html"><span>Modules</span></a></li>
 17      <li><a href="annotated.html"><span>Data&nbsp;Structures</span></a></li>
 18      <li><a href="files.html"><span>Files</span></a></li>
 19    </ul>
 20  </div>
 21</div>
 22<div class="header">
 23  <div class="summary">
 24<a href="#func-members">Functions</a>  </div>
 25  <div class="headertitle">
 26<h1>ENet peer functions</h1>  </div>
 27</div>
 28<div class="contents">
 29<table class="memberdecls">
 30<tr><td colspan="2"><h2><a name="func-members"></a>
 31Functions</h2></td></tr>
 32<tr><td class="memItemLeft" align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__peer.html#gab35807c848b6c88af12ce8476dffbc84">enet_peer_throttle_configure</a> (<a class="el" href="struct__ENetPeer.html">ENetPeer</a> *peer, <a class="el" href="types_8h.html#a5273659ca3c664b8550452732e9e4ae3">enet_uint32</a> interval, <a class="el" href="types_8h.html#a5273659ca3c664b8550452732e9e4ae3">enet_uint32</a> acceleration, <a class="el" href="types_8h.html#a5273659ca3c664b8550452732e9e4ae3">enet_uint32</a> deceleration)</td></tr>
 33<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Configures throttle parameter for a peer.  <a href="#gab35807c848b6c88af12ce8476dffbc84"></a><br/></td></tr>
 34<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ga52c5c6b1bbd807466298b2d7ed12fdd6"></a><!-- doxytag: member="peer::enet_peer_throttle" ref="ga52c5c6b1bbd807466298b2d7ed12fdd6" args="(ENetPeer *peer, enet_uint32 rtt)" -->
 35int&nbsp;</td><td class="memItemRight" valign="bottom"><b>enet_peer_throttle</b> (<a class="el" href="struct__ENetPeer.html">ENetPeer</a> *peer, <a class="el" href="types_8h.html#a5273659ca3c664b8550452732e9e4ae3">enet_uint32</a> rtt)</td></tr>
 36<tr><td class="memItemLeft" align="right" valign="top">int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__peer.html#gaf082a0ae58d9c435bed75c7325cf7290">enet_peer_send</a> (<a class="el" href="struct__ENetPeer.html">ENetPeer</a> *peer, <a class="el" href="types_8h.html#a34ce80c65abc6389fe0121a83d757f07">enet_uint8</a> channelID, <a class="el" href="struct__ENetPacket.html">ENetPacket</a> *packet)</td></tr>
 37<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Queues a packet to be sent.  <a href="#gaf082a0ae58d9c435bed75c7325cf7290"></a><br/></td></tr>
 38<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="struct__ENetPacket.html">ENetPacket</a> *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__peer.html#ga6493c7807f5381395305c9c48913a46c">enet_peer_receive</a> (<a class="el" href="struct__ENetPeer.html">ENetPeer</a> *peer, <a class="el" href="types_8h.html#a34ce80c65abc6389fe0121a83d757f07">enet_uint8</a> *channelID)</td></tr>
 39<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Attempts to dequeue any incoming queued packet.  <a href="#ga6493c7807f5381395305c9c48913a46c"></a><br/></td></tr>
 40<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ga9a8da1e258f10bbef173abd598534f09"></a><!-- doxytag: member="peer::enet_peer_reset_queues" ref="ga9a8da1e258f10bbef173abd598534f09" args="(ENetPeer *peer)" -->
 41void&nbsp;</td><td class="memItemRight" valign="bottom"><b>enet_peer_reset_queues</b> (<a class="el" href="struct__ENetPeer.html">ENetPeer</a> *peer)</td></tr>
 42<tr><td class="memItemLeft" align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__peer.html#ga9444dfff9574a7d21dbbdd34385a7d4d">enet_peer_reset</a> (<a class="el" href="struct__ENetPeer.html">ENetPeer</a> *peer)</td></tr>
 43<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Forcefully disconnects a peer.  <a href="#ga9444dfff9574a7d21dbbdd34385a7d4d"></a><br/></td></tr>
 44<tr><td class="memItemLeft" align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__peer.html#ga5c0708ddaf340aa42e7754a91ce456b6">enet_peer_ping</a> (<a class="el" href="struct__ENetPeer.html">ENetPeer</a> *peer)</td></tr>
 45<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Sends a ping request to a peer.  <a href="#ga5c0708ddaf340aa42e7754a91ce456b6"></a><br/></td></tr>
 46<tr><td class="memItemLeft" align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__peer.html#ga636cc45f52461b567d6daffe4ab8f4e9">enet_peer_disconnect_now</a> (<a class="el" href="struct__ENetPeer.html">ENetPeer</a> *peer, <a class="el" href="types_8h.html#a5273659ca3c664b8550452732e9e4ae3">enet_uint32</a> data)</td></tr>
 47<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Force an immediate disconnection from a peer.  <a href="#ga636cc45f52461b567d6daffe4ab8f4e9"></a><br/></td></tr>
 48<tr><td class="memItemLeft" align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__peer.html#ga0e807704b6ecace5004c2cdcfbf813c2">enet_peer_disconnect</a> (<a class="el" href="struct__ENetPeer.html">ENetPeer</a> *peer, <a class="el" href="types_8h.html#a5273659ca3c664b8550452732e9e4ae3">enet_uint32</a> data)</td></tr>
 49<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Request a disconnection from a peer.  <a href="#ga0e807704b6ecace5004c2cdcfbf813c2"></a><br/></td></tr>
 50<tr><td class="memItemLeft" align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__peer.html#ga759270d8cccec70f76274e93b49e5ac5">enet_peer_disconnect_later</a> (<a class="el" href="struct__ENetPeer.html">ENetPeer</a> *peer, <a class="el" href="types_8h.html#a5273659ca3c664b8550452732e9e4ae3">enet_uint32</a> data)</td></tr>
 51<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Request a disconnection from a peer, but only after all queued outgoing packets are sent.  <a href="#ga759270d8cccec70f76274e93b49e5ac5"></a><br/></td></tr>
 52<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ga6f8ab6421d3455b7b12b14f477ea83aa"></a><!-- doxytag: member="peer::enet_peer_queue_acknowledgement" ref="ga6f8ab6421d3455b7b12b14f477ea83aa" args="(ENetPeer *peer, const ENetProtocol *command, enet_uint16 sentTime)" -->
 53<a class="el" href="struct__ENetAcknowledgement.html">ENetAcknowledgement</a> *&nbsp;</td><td class="memItemRight" valign="bottom"><b>enet_peer_queue_acknowledgement</b> (<a class="el" href="struct__ENetPeer.html">ENetPeer</a> *peer, const <a class="el" href="union__ENetProtocol.html">ENetProtocol</a> *command, <a class="el" href="types_8h.html#a245102585fdf31bdf208639ef47bec5d">enet_uint16</a> sentTime)</td></tr>
 54<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ga67b9b1aceaffe1efe08c9a62de2a9be6"></a><!-- doxytag: member="peer::enet_peer_setup_outgoing_command" ref="ga67b9b1aceaffe1efe08c9a62de2a9be6" args="(ENetPeer *peer, ENetOutgoingCommand *outgoingCommand)" -->
 55void&nbsp;</td><td class="memItemRight" valign="bottom"><b>enet_peer_setup_outgoing_command</b> (<a class="el" href="struct__ENetPeer.html">ENetPeer</a> *peer, <a class="el" href="struct__ENetOutgoingCommand.html">ENetOutgoingCommand</a> *outgoingCommand)</td></tr>
 56<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ga0dff073e7882de81bdf46ae8e1bc3883"></a><!-- doxytag: member="peer::enet_peer_queue_outgoing_command" ref="ga0dff073e7882de81bdf46ae8e1bc3883" args="(ENetPeer *peer, const ENetProtocol *command, ENetPacket *packet, enet_uint32 offset, enet_uint16 length)" -->
 57<a class="el" href="struct__ENetOutgoingCommand.html">ENetOutgoingCommand</a> *&nbsp;</td><td class="memItemRight" valign="bottom"><b>enet_peer_queue_outgoing_command</b> (<a class="el" href="struct__ENetPeer.html">ENetPeer</a> *peer, const <a class="el" href="union__ENetProtocol.html">ENetProtocol</a> *command, <a class="el" href="struct__ENetPacket.html">ENetPacket</a> *packet, <a class="el" href="types_8h.html#a5273659ca3c664b8550452732e9e4ae3">enet_uint32</a> offset, <a class="el" href="types_8h.html#a245102585fdf31bdf208639ef47bec5d">enet_uint16</a> length)</td></tr>
 58<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ga9e5635d76d32276d211d655d6570bfd5"></a><!-- doxytag: member="peer::enet_peer_dispatch_incoming_unreliable_commands" ref="ga9e5635d76d32276d211d655d6570bfd5" args="(ENetPeer *peer, ENetChannel *channel)" -->
 59void&nbsp;</td><td class="memItemRight" valign="bottom"><b>enet_peer_dispatch_incoming_unreliable_commands</b> (<a class="el" href="struct__ENetPeer.html">ENetPeer</a> *peer, <a class="el" href="struct__ENetChannel.html">ENetChannel</a> *channel)</td></tr>
 60<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ga8b260c7d620fa30772db1426daf15ad0"></a><!-- doxytag: member="peer::enet_peer_dispatch_incoming_reliable_commands" ref="ga8b260c7d620fa30772db1426daf15ad0" args="(ENetPeer *peer, ENetChannel *channel)" -->
 61void&nbsp;</td><td class="memItemRight" valign="bottom"><b>enet_peer_dispatch_incoming_reliable_commands</b> (<a class="el" href="struct__ENetPeer.html">ENetPeer</a> *peer, <a class="el" href="struct__ENetChannel.html">ENetChannel</a> *channel)</td></tr>
 62<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="gad48f786cc1fa1b2453a1da9274c7427b"></a><!-- doxytag: member="peer::enet_peer_queue_incoming_command" ref="gad48f786cc1fa1b2453a1da9274c7427b" args="(ENetPeer *peer, const ENetProtocol *command, ENetPacket *packet, enet_uint32 fragmentCount)" -->
 63<a class="el" href="struct__ENetIncomingCommand.html">ENetIncomingCommand</a> *&nbsp;</td><td class="memItemRight" valign="bottom"><b>enet_peer_queue_incoming_command</b> (<a class="el" href="struct__ENetPeer.html">ENetPeer</a> *peer, const <a class="el" href="union__ENetProtocol.html">ENetProtocol</a> *command, <a class="el" href="struct__ENetPacket.html">ENetPacket</a> *packet, <a class="el" href="types_8h.html#a5273659ca3c664b8550452732e9e4ae3">enet_uint32</a> fragmentCount)</td></tr>
 64</table>
 65<hr/><h2>Function Documentation</h2>
 66<a class="anchor" id="ga0e807704b6ecace5004c2cdcfbf813c2"></a><!-- doxytag: member="peer.c::enet_peer_disconnect" ref="ga0e807704b6ecace5004c2cdcfbf813c2" args="(ENetPeer *peer, enet_uint32 data)" -->
 67<div class="memitem">
 68<div class="memproto">
 69      <table class="memname">
 70        <tr>
 71          <td class="memname">void enet_peer_disconnect </td>
 72          <td>(</td>
 73          <td class="paramtype"><a class="el" href="struct__ENetPeer.html">ENetPeer</a> *&nbsp;</td>
 74          <td class="paramname"> <em>peer</em>, </td>
 75        </tr>
 76        <tr>
 77          <td class="paramkey"></td>
 78          <td></td>
 79          <td class="paramtype"><a class="el" href="types_8h.html#a5273659ca3c664b8550452732e9e4ae3">enet_uint32</a>&nbsp;</td>
 80          <td class="paramname"> <em>data</em></td><td>&nbsp;</td>
 81        </tr>
 82        <tr>
 83          <td></td>
 84          <td>)</td>
 85          <td></td><td></td><td></td>
 86        </tr>
 87      </table>
 88</div>
 89<div class="memdoc">
 90<dl><dt><b>Parameters:</b></dt><dd>
 91  <table border="0" cellspacing="2" cellpadding="0">
 92    <tr><td valign="top"></td><td valign="top"><em>peer</em>&nbsp;</td><td>peer to request a disconnection </td></tr>
 93    <tr><td valign="top"></td><td valign="top"><em>data</em>&nbsp;</td><td>data describing the disconnection </td></tr>
 94  </table>
 95  </dd>
 96</dl>
 97<dl class="remark"><dt><b>Remarks:</b></dt><dd>An ENET_EVENT_DISCONNECT event will be generated by <a class="el" href="group__host.html#ga6ba501b3ee576e5578c8e6d1694ebd49" title="Waits for events on the host specified and shuttles packets between the host and its peers...">enet_host_service()</a> once the disconnection is complete. </dd></dl>
 98
 99<p>References <a class="el" href="group__host.html#gac8f53bcdbd540043f87e7d59048559fa">enet_host_flush()</a>, <a class="el" href="unix_8h.html#a7bbe3d7e47fd45dda29c0e4a94abe131">ENET_HOST_TO_NET_32</a>, and <a class="el" href="group__peer.html#ga9444dfff9574a7d21dbbdd34385a7d4d">enet_peer_reset()</a>.</p>
100
101<p>Referenced by <a class="el" href="group__peer.html#ga759270d8cccec70f76274e93b49e5ac5">enet_peer_disconnect_later()</a>.</p>
102
103</div>
104</div>
105<a class="anchor" id="ga759270d8cccec70f76274e93b49e5ac5"></a><!-- doxytag: member="peer.c::enet_peer_disconnect_later" ref="ga759270d8cccec70f76274e93b49e5ac5" args="(ENetPeer *peer, enet_uint32 data)" -->
106<div class="memitem">
107<div class="memproto">
108      <table class="memname">
109        <tr>
110          <td class="memname">void enet_peer_disconnect_later </td>
111          <td>(</td>
112          <td class="paramtype"><a class="el" href="struct__ENetPeer.html">ENetPeer</a> *&nbsp;</td>
113          <td class="paramname"> <em>peer</em>, </td>
114        </tr>
115        <tr>
116          <td class="paramkey"></td>
117          <td></td>
118          <td class="paramtype"><a class="el" href="types_8h.html#a5273659ca3c664b8550452732e9e4ae3">enet_uint32</a>&nbsp;</td>
119          <td class="paramname"> <em>data</em></td><td>&nbsp;</td>
120        </tr>
121        <tr>
122          <td></td>
123          <td>)</td>
124          <td></td><td></td><td></td>
125        </tr>
126      </table>
127</div>
128<div class="memdoc">
129<dl><dt><b>Parameters:</b></dt><dd>
130  <table border="0" cellspacing="2" cellpadding="0">
131    <tr><td valign="top"></td><td valign="top"><em>peer</em>&nbsp;</td><td>peer to request a disconnection </td></tr>
132    <tr><td valign="top"></td><td valign="top"><em>data</em>&nbsp;</td><td>data describing the disconnection </td></tr>
133  </table>
134  </dd>
135</dl>
136<dl class="remark"><dt><b>Remarks:</b></dt><dd>An ENET_EVENT_DISCONNECT event will be generated by <a class="el" href="group__host.html#ga6ba501b3ee576e5578c8e6d1694ebd49" title="Waits for events on the host specified and shuttles packets between the host and its peers...">enet_host_service()</a> once the disconnection is complete. </dd></dl>
137
138<p>References <a class="el" href="group__peer.html#ga0e807704b6ecace5004c2cdcfbf813c2">enet_peer_disconnect()</a>.</p>
139
140</div>
141</div>
142<a class="anchor" id="ga636cc45f52461b567d6daffe4ab8f4e9"></a><!-- doxytag: member="peer.c::enet_peer_disconnect_now" ref="ga636cc45f52461b567d6daffe4ab8f4e9" args="(ENetPeer *peer, enet_uint32 data)" -->
143<div class="memitem">
144<div class="memproto">
145      <table class="memname">
146        <tr>
147          <td class="memname">void enet_peer_disconnect_now </td>
148          <td>(</td>
149          <td class="paramtype"><a class="el" href="struct__ENetPeer.html">ENetPeer</a> *&nbsp;</td>
150          <td class="paramname"> <em>peer</em>, </td>
151        </tr>
152        <tr>
153          <td class="paramkey"></td>
154          <td></td>
155          <td class="paramtype"><a class="el" href="types_8h.html#a5273659ca3c664b8550452732e9e4ae3">enet_uint32</a>&nbsp;</td>
156          <td class="paramname"> <em>data</em></td><td>&nbsp;</td>
157        </tr>
158        <tr>
159          <td></td>
160          <td>)</td>
161          <td></td><td></td><td></td>
162        </tr>
163      </table>
164</div>
165<div class="memdoc">
166<dl><dt><b>Parameters:</b></dt><dd>
167  <table border="0" cellspacing="2" cellpadding="0">
168    <tr><td valign="top"></td><td valign="top"><em>peer</em>&nbsp;</td><td>peer to disconnect </td></tr>
169    <tr><td valign="top"></td><td valign="top"><em>data</em>&nbsp;</td><td>data describing the disconnection </td></tr>
170  </table>
171  </dd>
172</dl>
173<dl class="remark"><dt><b>Remarks:</b></dt><dd>No ENET_EVENT_DISCONNECT event will be generated. The foreign peer is not guarenteed to receive the disconnect notification, and is reset immediately upon return from this function. </dd></dl>
174
175<p>References <a class="el" href="group__host.html#gac8f53bcdbd540043f87e7d59048559fa">enet_host_flush()</a>, <a class="el" href="unix_8h.html#a7bbe3d7e47fd45dda29c0e4a94abe131">ENET_HOST_TO_NET_32</a>, and <a class="el" href="group__peer.html#ga9444dfff9574a7d21dbbdd34385a7d4d">enet_peer_reset()</a>.</p>
176
177</div>
178</div>
179<a class="anchor" id="ga5c0708ddaf340aa42e7754a91ce456b6"></a><!-- doxytag: member="peer.c::enet_peer_ping" ref="ga5c0708ddaf340aa42e7754a91ce456b6" args="(ENetPeer *peer)" -->
180<div class="memitem">
181<div class="memproto">
182      <table class="memname">
183        <tr>
184          <td class="memname">void enet_peer_ping </td>
185          <td>(</td>
186          <td class="paramtype"><a class="el" href="struct__ENetPeer.html">ENetPeer</a> *&nbsp;</td>
187          <td class="paramname"> <em>peer</em></td>
188          <td>&nbsp;)&nbsp;</td>
189          <td></td>
190        </tr>
191      </table>
192</div>
193<div class="memdoc">
194<dl><dt><b>Parameters:</b></dt><dd>
195  <table border="0" cellspacing="2" cellpadding="0">
196    <tr><td valign="top"></td><td valign="top"><em>peer</em>&nbsp;</td><td>destination for the ping request </td></tr>
197  </table>
198  </dd>
199</dl>
200<dl class="remark"><dt><b>Remarks:</b></dt><dd>ping requests factor into the mean round trip time as designated by the roundTripTime field in the ENetPeer structure. Enet automatically pings all connected peers at regular intervals, however, this function may be called to ensure more frequent ping requests. </dd></dl>
201
202</div>
203</div>
204<a class="anchor" id="ga6493c7807f5381395305c9c48913a46c"></a><!-- doxytag: member="peer.c::enet_peer_receive" ref="ga6493c7807f5381395305c9c48913a46c" args="(ENetPeer *peer, enet_uint8 *channelID)" -->
205<div class="memitem">
206<div class="memproto">
207      <table class="memname">
208        <tr>
209          <td class="memname"><a class="el" href="struct__ENetPacket.html">ENetPacket</a>* enet_peer_receive </td>
210          <td>(</td>
211          <td class="paramtype"><a class="el" href="struct__ENetPeer.html">ENetPeer</a> *&nbsp;</td>
212          <td class="paramname"> <em>peer</em>, </td>
213        </tr>
214        <tr>
215          <td class="paramkey"></td>
216          <td></td>
217          <td class="paramtype"><a class="el" href="types_8h.html#a34ce80c65abc6389fe0121a83d757f07">enet_uint8</a> *&nbsp;</td>
218          <td class="paramname"> <em>channelID</em></td><td>&nbsp;</td>
219        </tr>
220        <tr>
221          <td></td>
222          <td>)</td>
223          <td></td><td></td><td></td>
224        </tr>
225      </table>
226</div>
227<div class="memdoc">
228<dl><dt><b>Parameters:</b></dt><dd>
229  <table border="0" cellspacing="2" cellpadding="0">
230    <tr><td valign="top"></td><td valign="top"><em>peer</em>&nbsp;</td><td>peer to dequeue packets from </td></tr>
231    <tr><td valign="top"></td><td valign="top"><em>channelID</em>&nbsp;</td><td>holds the channel ID of the channel the packet was received on success </td></tr>
232  </table>
233  </dd>
234</dl>
235<dl class="return"><dt><b>Returns:</b></dt><dd>a pointer to the packet, or NULL if there are no available incoming queued packets </dd></dl>
236
237</div>
238</div>
239<a class="anchor" id="ga9444dfff9574a7d21dbbdd34385a7d4d"></a><!-- doxytag: member="peer.c::enet_peer_reset" ref="ga9444dfff9574a7d21dbbdd34385a7d4d" args="(ENetPeer *peer)" -->
240<div class="memitem">
241<div class="memproto">
242      <table class="memname">
243        <tr>
244          <td class="memname">void enet_peer_reset </td>
245          <td>(</td>
246          <td class="paramtype"><a class="el" href="struct__ENetPeer.html">ENetPeer</a> *&nbsp;</td>
247          <td class="paramname"> <em>peer</em></td>
248          <td>&nbsp;)&nbsp;</td>
249          <td></td>
250        </tr>
251      </table>
252</div>
253<div class="memdoc">
254<dl><dt><b>Parameters:</b></dt><dd>
255  <table border="0" cellspacing="2" cellpadding="0">
256    <tr><td valign="top"></td><td valign="top"><em>peer</em>&nbsp;</td><td>peer to forcefully disconnect </td></tr>
257  </table>
258  </dd>
259</dl>
260<dl class="remark"><dt><b>Remarks:</b></dt><dd>The foreign host represented by the peer is not notified of the disconnection and will timeout on its connection to the local host. </dd></dl>
261
262<p>Referenced by <a class="el" href="group__host.html#ga5567a95d7a45521dc9cba93a9066c940">enet_host_create()</a>, <a class="el" href="group__host.html#gacec1e9a0b528c1f9ce30544d2d5b5b79">enet_host_destroy()</a>, <a class="el" href="group__peer.html#ga0e807704b6ecace5004c2cdcfbf813c2">enet_peer_disconnect()</a>, and <a class="el" href="group__peer.html#ga636cc45f52461b567d6daffe4ab8f4e9">enet_peer_disconnect_now()</a>.</p>
263
264</div>
265</div>
266<a class="anchor" id="gaf082a0ae58d9c435bed75c7325cf7290"></a><!-- doxytag: member="peer.c::enet_peer_send" ref="gaf082a0ae58d9c435bed75c7325cf7290" args="(ENetPeer *peer, enet_uint8 channelID, ENetPacket *packet)" -->
267<div class="memitem">
268<div class="memproto">
269      <table class="memname">
270        <tr>
271          <td class="memname">int enet_peer_send </td>
272          <td>(</td>
273          <td class="paramtype"><a class="el" href="struct__ENetPeer.html">ENetPeer</a> *&nbsp;</td>
274          <td class="paramname"> <em>peer</em>, </td>
275        </tr>
276        <tr>
277          <td class="paramkey"></td>
278          <td></td>
279          <td class="paramtype"><a class="el" href="types_8h.html#a34ce80c65abc6389fe0121a83d757f07">enet_uint8</a>&nbsp;</td>
280          <td class="paramname"> <em>channelID</em>, </td>
281        </tr>
282        <tr>
283          <td class="paramkey"></td>
284          <td></td>
285          <td class="paramtype"><a class="el" href="struct__ENetPacket.html">ENetPacket</a> *&nbsp;</td>
286          <td class="paramname"> <em>packet</em></td><td>&nbsp;</td>
287        </tr>
288        <tr>
289          <td></td>
290          <td>)</td>
291          <td></td><td></td><td></td>
292        </tr>
293      </table>
294</div>
295<div class="memdoc">
296<dl><dt><b>Parameters:</b></dt><dd>
297  <table border="0" cellspacing="2" cellpadding="0">
298    <tr><td valign="top"></td><td valign="top"><em>peer</em>&nbsp;</td><td>destination for the packet </td></tr>
299    <tr><td valign="top"></td><td valign="top"><em>channelID</em>&nbsp;</td><td>channel on which to send </td></tr>
300    <tr><td valign="top"></td><td valign="top"><em>packet</em>&nbsp;</td><td>packet to send </td></tr>
301  </table>
302  </dd>
303</dl>
304<dl><dt><b>Return values:</b></dt><dd>
305  <table border="0" cellspacing="2" cellpadding="0">
306    <tr><td valign="top"></td><td valign="top"><em>0</em>&nbsp;</td><td>on success </td></tr>
307    <tr><td valign="top"></td><td valign="top"><em>&lt;</em>&nbsp;</td><td>0 on failure </td></tr>
308  </table>
309  </dd>
310</dl>
311
312<p>References <a class="el" href="unix_8h.html#a4ede48cf4612d407ac6b6f064e3117bc">ENET_HOST_TO_NET_16</a>, <a class="el" href="unix_8h.html#a7bbe3d7e47fd45dda29c0e4a94abe131">ENET_HOST_TO_NET_32</a>, <a class="el" href="unix_8h.html#a6fdfe9a0019e06da5931f10263f14d59">ENET_NET_TO_HOST_32</a>, <a class="el" href="enet_8h.html#a9d1fc0ce6da0a057f18bd8b9c762003daab20e7088245ab2ddb7f11dcc9433738">ENET_PACKET_FLAG_RELIABLE</a>, and <a class="el" href="enet_8h.html#a9d1fc0ce6da0a057f18bd8b9c762003dad230cc769ef9cc4c7c582b28f9c443fe">ENET_PACKET_FLAG_UNSEQUENCED</a>.</p>
313
314<p>Referenced by <a class="el" href="group__host.html#ga5190a63f78eb0c15bd96cda44bf423c6">enet_host_broadcast()</a>.</p>
315
316</div>
317</div>
318<a class="anchor" id="gab35807c848b6c88af12ce8476dffbc84"></a><!-- doxytag: member="peer.c::enet_peer_throttle_configure" ref="gab35807c848b6c88af12ce8476dffbc84" args="(ENetPeer *peer, enet_uint32 interval, enet_uint32 acceleration, enet_uint32 deceleration)" -->
319<div class="memitem">
320<div class="memproto">
321      <table class="memname">
322        <tr>
323          <td class="memname">void enet_peer_throttle_configure </td>
324          <td>(</td>
325          <td class="paramtype"><a class="el" href="struct__ENetPeer.html">ENetPeer</a> *&nbsp;</td>
326          <td class="paramname"> <em>peer</em>, </td>
327        </tr>
328        <tr>
329          <td class="paramkey"></td>
330          <td></td>
331          <td class="paramtype"><a class="el" href="types_8h.html#a5273659ca3c664b8550452732e9e4ae3">enet_uint32</a>&nbsp;</td>
332          <td class="paramname"> <em>interval</em>, </td>
333        </tr>
334        <tr>
335          <td class="paramkey"></td>
336          <td></td>
337          <td class="paramtype"><a class="el" href="types_8h.html#a5273659ca3c664b8550452732e9e4ae3">enet_uint32</a>&nbsp;</td>
338          <td class="paramname"> <em>acceleration</em>, </td>
339        </tr>
340        <tr>
341          <td class="paramkey"></td>
342          <td></td>
343          <td class="paramtype"><a class="el" href="types_8h.html#a5273659ca3c664b8550452732e9e4ae3">enet_uint32</a>&nbsp;</td>
344          <td class="paramname"> <em>deceleration</em></td><td>&nbsp;</td>
345        </tr>
346        <tr>
347          <td></td>
348          <td>)</td>
349          <td></td><td></td><td></td>
350        </tr>
351      </table>
352</div>
353<div class="memdoc">
354<p>Unreliable packets are dropped by ENet in response to the varying conditions of the Internet connection to the peer. The throttle represents a probability that an unreliable packet should not be dropped and thus sent by ENet to the peer. The lowest mean round trip time from the sending of a reliable packet to the receipt of its acknowledgement is measured over an amount of time specified by the interval parameter in milliseconds. If a measured round trip time happens to be significantly less than the mean round trip time measured over the interval, then the throttle probability is increased to allow more traffic by an amount specified in the acceleration parameter, which is a ratio to the ENET_PEER_PACKET_THROTTLE_SCALE constant. If a measured round trip time happens to be significantly greater than the mean round trip time measured over the interval, then the throttle probability is decreased to limit traffic by an amount specified in the deceleration parameter, which is a ratio to the ENET_PEER_PACKET_THROTTLE_SCALE constant. When the throttle has a value of ENET_PEER_PACKET_THROTTLE_SCALE, on unreliable packets are dropped by ENet, and so 100% of all unreliable packets will be sent. When the throttle has a value of 0, all unreliable packets are dropped by ENet, and so 0% of all unreliable packets will be sent. Intermediate values for the throttle represent intermediate probabilities between 0% and 100% of unreliable packets being sent. The bandwidth limits of the local and foreign hosts are taken into account to determine a sensible limit for the throttle probability above which it should not raise even in the best of conditions.</p>
355<dl><dt><b>Parameters:</b></dt><dd>
356  <table border="0" cellspacing="2" cellpadding="0">
357    <tr><td valign="top"></td><td valign="top"><em>peer</em>&nbsp;</td><td>peer to configure </td></tr>
358    <tr><td valign="top"></td><td valign="top"><em>interval</em>&nbsp;</td><td>interval, in milliseconds, over which to measure lowest mean RTT; the default value is ENET_PEER_PACKET_THROTTLE_INTERVAL. </td></tr>
359    <tr><td valign="top"></td><td valign="top"><em>acceleration</em>&nbsp;</td><td>rate at which to increase the throttle probability as mean RTT declines </td></tr>
360    <tr><td valign="top"></td><td valign="top"><em>deceleration</em>&nbsp;</td><td>rate at which to decrease the throttle probability as mean RTT increases </td></tr>
361  </table>
362  </dd>
363</dl>
364
365<p>References <a class="el" href="unix_8h.html#a7bbe3d7e47fd45dda29c0e4a94abe131">ENET_HOST_TO_NET_32</a>.</p>
366
367</div>
368</div>
369</div>
370<hr class="footer"/><address class="footer"><small>Generated on Wed Feb 9 2011 21:31:05 for enet by&nbsp;
371<a href="http://www.doxygen.org/index.html">
372<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.7.1 </small></address>
373</body>
374</html>