PageRenderTime 109ms CodeModel.GetById 20ms app.highlight 66ms RepoModel.GetById 2ms app.codeStats 0ms

/src/middleware/enet/docs/enet_8h_source.html

https://bitbucket.org/vivkin/gam3b00bs/
HTML | 412 lines | 411 code | 0 blank | 1 comment | 0 complexity | 9a842e4cfd97d13427c585afb952f5d2 MD5 | raw file

Large files files are truncated, but you can click here to view the full 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.h Source File</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 class="current"><a href="files.html"><span>Files</span></a></li>
 19    </ul>
 20  </div>
 21  <div class="tabs2">
 22    <ul class="tablist">
 23      <li><a href="files.html"><span>File&nbsp;List</span></a></li>
 24      <li><a href="globals.html"><span>Globals</span></a></li>
 25    </ul>
 26  </div>
 27<div class="header">
 28  <div class="headertitle">
 29<h1>enet.h</h1>  </div>
 30</div>
 31<div class="contents">
 32<a href="enet_8h.html">Go to the documentation of this file.</a><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 
 33<a name="l00005"></a>00005 <span class="preprocessor">#ifndef __ENET_ENET_H__</span>
 34<a name="l00006"></a>00006 <span class="preprocessor"></span><span class="preprocessor">#define __ENET_ENET_H__</span>
 35<a name="l00007"></a>00007 <span class="preprocessor"></span>
 36<a name="l00008"></a>00008 <span class="preprocessor">#ifdef __cplusplus</span>
 37<a name="l00009"></a>00009 <span class="preprocessor"></span><span class="keyword">extern</span> <span class="stringliteral">&quot;C&quot;</span>
 38<a name="l00010"></a>00010 {
 39<a name="l00011"></a>00011 <span class="preprocessor">#endif</span>
 40<a name="l00012"></a>00012 <span class="preprocessor"></span>
 41<a name="l00013"></a>00013 <span class="preprocessor">#include &lt;stdlib.h&gt;</span>
 42<a name="l00014"></a>00014 
 43<a name="l00015"></a>00015 <span class="preprocessor">#ifdef WIN32</span>
 44<a name="l00016"></a>00016 <span class="preprocessor"></span><span class="preprocessor">#include &quot;<a class="code" href="win32_8h.html" title="ENet Win32 header.">enet/win32.h</a>&quot;</span>
 45<a name="l00017"></a>00017 <span class="preprocessor">#else</span>
 46<a name="l00018"></a>00018 <span class="preprocessor"></span><span class="preprocessor">#include &quot;<a class="code" href="unix_8h.html" title="ENet Unix header.">enet/unix.h</a>&quot;</span>
 47<a name="l00019"></a>00019 <span class="preprocessor">#endif</span>
 48<a name="l00020"></a>00020 <span class="preprocessor"></span>
 49<a name="l00021"></a>00021 <span class="preprocessor">#include &quot;<a class="code" href="types_8h.html" title="type definitions for ENet">enet/types.h</a>&quot;</span>
 50<a name="l00022"></a>00022 <span class="preprocessor">#include &quot;<a class="code" href="protocol_8h.html" title="ENet protocol.">enet/protocol.h</a>&quot;</span>
 51<a name="l00023"></a>00023 <span class="preprocessor">#include &quot;<a class="code" href="list_8h.html" title="ENet list management.">enet/list.h</a>&quot;</span>
 52<a name="l00024"></a>00024 <span class="preprocessor">#include &quot;<a class="code" href="callbacks_8h.html" title="ENet callbacks.">enet/callbacks.h</a>&quot;</span>
 53<a name="l00025"></a>00025 
 54<a name="l00026"></a>00026 <span class="preprocessor">#define ENET_VERSION_MAJOR 1</span>
 55<a name="l00027"></a>00027 <span class="preprocessor"></span><span class="preprocessor">#define ENET_VERSION_MINOR 3</span>
 56<a name="l00028"></a>00028 <span class="preprocessor"></span><span class="preprocessor">#define ENET_VERSION_PATCH 1</span>
 57<a name="l00029"></a>00029 <span class="preprocessor"></span><span class="preprocessor">#define ENET_VERSION_CREATE(major, minor, patch) (((major)&lt;&lt;16) | ((minor)&lt;&lt;8) | (patch))</span>
 58<a name="l00030"></a>00030 <span class="preprocessor"></span><span class="preprocessor">#define ENET_VERSION ENET_VERSION_CREATE(ENET_VERSION_MAJOR, ENET_VERSION_MINOR, ENET_VERSION_PATCH)</span>
 59<a name="l00031"></a>00031 <span class="preprocessor"></span>
 60<a name="l00032"></a>00032 <span class="keyword">typedef</span> <a class="code" href="types_8h.html#a5273659ca3c664b8550452732e9e4ae3" title="unsigned 32-bit type">enet_uint32</a> ENetVersion;
 61<a name="l00033"></a>00033 
 62<a name="l00034"></a>00034 <span class="keyword">typedef</span> <span class="keyword">enum</span> _ENetSocketType
 63<a name="l00035"></a>00035 {
 64<a name="l00036"></a>00036    ENET_SOCKET_TYPE_STREAM   = 1,
 65<a name="l00037"></a>00037    ENET_SOCKET_TYPE_DATAGRAM = 2
 66<a name="l00038"></a>00038 } ENetSocketType;
 67<a name="l00039"></a>00039 
 68<a name="l00040"></a>00040 <span class="keyword">typedef</span> <span class="keyword">enum</span> _ENetSocketWait
 69<a name="l00041"></a>00041 {
 70<a name="l00042"></a>00042    ENET_SOCKET_WAIT_NONE    = 0,
 71<a name="l00043"></a>00043    ENET_SOCKET_WAIT_SEND    = (1 &lt;&lt; 0),
 72<a name="l00044"></a>00044    ENET_SOCKET_WAIT_RECEIVE = (1 &lt;&lt; 1)
 73<a name="l00045"></a>00045 } ENetSocketWait;
 74<a name="l00046"></a>00046 
 75<a name="l00047"></a>00047 <span class="keyword">typedef</span> <span class="keyword">enum</span> _ENetSocketOption
 76<a name="l00048"></a>00048 {
 77<a name="l00049"></a>00049    ENET_SOCKOPT_NONBLOCK  = 1,
 78<a name="l00050"></a>00050    ENET_SOCKOPT_BROADCAST = 2,
 79<a name="l00051"></a>00051    ENET_SOCKOPT_RCVBUF    = 3,
 80<a name="l00052"></a>00052    ENET_SOCKOPT_SNDBUF    = 4,
 81<a name="l00053"></a>00053    ENET_SOCKOPT_REUSEADDR = 5
 82<a name="l00054"></a>00054 } ENetSocketOption;
 83<a name="l00055"></a>00055 
 84<a name="l00056"></a>00056 <span class="keyword">enum</span>
 85<a name="l00057"></a>00057 {
 86<a name="l00058"></a><a class="code" href="enet_8h.html#adf764cbdea00d65edcd07bb9953ad2b7a3d8d24eeb6e426826e88540d7c87d036">00058</a>    <a class="code" href="enet_8h.html#adf764cbdea00d65edcd07bb9953ad2b7a3d8d24eeb6e426826e88540d7c87d036" title="specifies the default server host">ENET_HOST_ANY</a>       = 0,            
 87<a name="l00059"></a><a class="code" href="enet_8h.html#adf764cbdea00d65edcd07bb9953ad2b7af40f3e48e3f87859c06d62023601eb57">00059</a>    <a class="code" href="enet_8h.html#adf764cbdea00d65edcd07bb9953ad2b7af40f3e48e3f87859c06d62023601eb57" title="specifies a subnet-wide broadcast">ENET_HOST_BROADCAST</a> = 0xFFFFFFFF,   
 88<a name="l00061"></a><a class="code" href="enet_8h.html#adf764cbdea00d65edcd07bb9953ad2b7a851f798e15c7f68c29a5755ac7d7cce4">00061</a>    <a class="code" href="enet_8h.html#adf764cbdea00d65edcd07bb9953ad2b7a851f798e15c7f68c29a5755ac7d7cce4" title="specifies that a port should be automatically chosen">ENET_PORT_ANY</a>       = 0             
 89<a name="l00062"></a>00062 };
 90<a name="l00063"></a>00063 
 91<a name="l00074"></a><a class="code" href="struct__ENetAddress.html">00074</a> <span class="keyword">typedef</span> <span class="keyword">struct </span><a class="code" href="struct__ENetAddress.html" title="Portable internet address structure.">_ENetAddress</a>
 92<a name="l00075"></a>00075 {
 93<a name="l00076"></a>00076    <a class="code" href="types_8h.html#a5273659ca3c664b8550452732e9e4ae3" title="unsigned 32-bit type">enet_uint32</a> host;
 94<a name="l00077"></a>00077    <a class="code" href="types_8h.html#a245102585fdf31bdf208639ef47bec5d" title="unsigned 16-bit type">enet_uint16</a> port;
 95<a name="l00078"></a>00078 } <a class="code" href="struct__ENetAddress.html" title="Portable internet address structure.">ENetAddress</a>;
 96<a name="l00079"></a>00079 
 97<a name="l00089"></a><a class="code" href="enet_8h.html#a9d1fc0ce6da0a057f18bd8b9c762003d">00089</a> <span class="keyword">typedef</span> <span class="keyword">enum</span> <a class="code" href="enet_8h.html#a9d1fc0ce6da0a057f18bd8b9c762003d" title="Packet flag bit constants.">_ENetPacketFlag</a>
 98<a name="l00090"></a>00090 {
 99<a name="l00093"></a><a class="code" href="enet_8h.html#a9d1fc0ce6da0a057f18bd8b9c762003daab20e7088245ab2ddb7f11dcc9433738">00093</a>    <a class="code" href="enet_8h.html#a9d1fc0ce6da0a057f18bd8b9c762003daab20e7088245ab2ddb7f11dcc9433738" title="packet must be received by the target peer and resend attempts should be made until the packet is del...">ENET_PACKET_FLAG_RELIABLE</a>    = (1 &lt;&lt; 0),
100<a name="l00097"></a><a class="code" href="enet_8h.html#a9d1fc0ce6da0a057f18bd8b9c762003dad230cc769ef9cc4c7c582b28f9c443fe">00097</a>    <a class="code" href="enet_8h.html#a9d1fc0ce6da0a057f18bd8b9c762003dad230cc769ef9cc4c7c582b28f9c443fe" title="packet will not be sequenced with other packets not supported for reliable packets">ENET_PACKET_FLAG_UNSEQUENCED</a> = (1 &lt;&lt; 1),
101<a name="l00099"></a><a class="code" href="enet_8h.html#a9d1fc0ce6da0a057f18bd8b9c762003daa6ce462752c36aad22e68ebefac3df8c">00099</a>    <a class="code" href="enet_8h.html#a9d1fc0ce6da0a057f18bd8b9c762003daa6ce462752c36aad22e68ebefac3df8c" title="packet will not allocate data, and user must supply it instead">ENET_PACKET_FLAG_NO_ALLOCATE</a> = (1 &lt;&lt; 2)
102<a name="l00100"></a>00100 } <a class="code" href="enet_8h.html#a8441ed0d3b01899c4b7c6e9c5d72aa41" title="Packet flag bit constants.">ENetPacketFlag</a>;
103<a name="l00101"></a>00101 
104<a name="l00102"></a>00102 <span class="keyword">struct </span><a class="code" href="struct__ENetPacket.html" title="ENet packet structure.">_ENetPacket</a>;
105<a name="l00103"></a>00103 <span class="keyword">typedef</span> void (ENET_CALLBACK * ENetPacketFreeCallback) (<span class="keyword">struct </span><a class="code" href="struct__ENetPacket.html" title="ENet packet structure.">_ENetPacket</a> *);
106<a name="l00104"></a>00104 
107<a name="l00124"></a><a class="code" href="struct__ENetPacket.html">00124</a> <span class="keyword">typedef</span> <span class="keyword">struct </span><a class="code" href="struct__ENetPacket.html" title="ENet packet structure.">_ENetPacket</a>
108<a name="l00125"></a>00125 {
109<a name="l00126"></a><a class="code" href="struct__ENetPacket.html#ad951d74263f23a529bbd57bf2316d950">00126</a>    <span class="keywordtype">size_t</span>                   <a class="code" href="struct__ENetPacket.html#ad951d74263f23a529bbd57bf2316d950" title="internal use only">referenceCount</a>;  
110<a name="l00127"></a><a class="code" href="struct__ENetPacket.html#abfdabe5885bc9695e2dabced27d5447a">00127</a>    <a class="code" href="types_8h.html#a5273659ca3c664b8550452732e9e4ae3" title="unsigned 32-bit type">enet_uint32</a>              <a class="code" href="struct__ENetPacket.html#abfdabe5885bc9695e2dabced27d5447a" title="bitwise-or of ENetPacketFlag constants">flags</a>;           
111<a name="l00128"></a><a class="code" href="struct__ENetPacket.html#aa8b428cfa2c7a5ae9efbace5e1bded32">00128</a>    <a class="code" href="types_8h.html#a34ce80c65abc6389fe0121a83d757f07" title="unsigned 8-bit type">enet_uint8</a> *             <a class="code" href="struct__ENetPacket.html#aa8b428cfa2c7a5ae9efbace5e1bded32" title="allocated data for packet">data</a>;            
112<a name="l00129"></a><a class="code" href="struct__ENetPacket.html#a1ba82e9b63e4d64fc06dcf113bb0ac77">00129</a>    <span class="keywordtype">size_t</span>                   <a class="code" href="struct__ENetPacket.html#a1ba82e9b63e4d64fc06dcf113bb0ac77" title="length of data">dataLength</a>;      
113<a name="l00130"></a><a class="code" href="struct__ENetPacket.html#aa06949fd22cef654c7ef07b8d4865a9f">00130</a>    ENetPacketFreeCallback   <a class="code" href="struct__ENetPacket.html#aa06949fd22cef654c7ef07b8d4865a9f" title="function to be called when the packet is no longer in use">freeCallback</a>;    
114<a name="l00131"></a>00131 } <a class="code" href="struct__ENetPacket.html" title="ENet packet structure.">ENetPacket</a>;
115<a name="l00132"></a>00132 
116<a name="l00133"></a><a class="code" href="struct__ENetAcknowledgement.html">00133</a> <span class="keyword">typedef</span> <span class="keyword">struct </span><a class="code" href="struct__ENetAcknowledgement.html">_ENetAcknowledgement</a>
117<a name="l00134"></a>00134 {
118<a name="l00135"></a>00135    <a class="code" href="struct__ENetListNode.html">ENetListNode</a> acknowledgementList;
119<a name="l00136"></a>00136    <a class="code" href="types_8h.html#a5273659ca3c664b8550452732e9e4ae3" title="unsigned 32-bit type">enet_uint32</a>  sentTime;
120<a name="l00137"></a>00137    <a class="code" href="union__ENetProtocol.html">ENetProtocol</a> command;
121<a name="l00138"></a>00138 } <a class="code" href="struct__ENetAcknowledgement.html">ENetAcknowledgement</a>;
122<a name="l00139"></a>00139 
123<a name="l00140"></a><a class="code" href="struct__ENetOutgoingCommand.html">00140</a> <span class="keyword">typedef</span> <span class="keyword">struct </span><a class="code" href="struct__ENetOutgoingCommand.html">_ENetOutgoingCommand</a>
124<a name="l00141"></a>00141 {
125<a name="l00142"></a>00142    <a class="code" href="struct__ENetListNode.html">ENetListNode</a> outgoingCommandList;
126<a name="l00143"></a>00143    <a class="code" href="types_8h.html#a245102585fdf31bdf208639ef47bec5d" title="unsigned 16-bit type">enet_uint16</a>  reliableSequenceNumber;
127<a name="l00144"></a>00144    <a class="code" href="types_8h.html#a245102585fdf31bdf208639ef47bec5d" title="unsigned 16-bit type">enet_uint16</a>  unreliableSequenceNumber;
128<a name="l00145"></a>00145    <a class="code" href="types_8h.html#a5273659ca3c664b8550452732e9e4ae3" title="unsigned 32-bit type">enet_uint32</a>  sentTime;
129<a name="l00146"></a>00146    <a class="code" href="types_8h.html#a5273659ca3c664b8550452732e9e4ae3" title="unsigned 32-bit type">enet_uint32</a>  roundTripTimeout;
130<a name="l00147"></a>00147    <a class="code" href="types_8h.html#a5273659ca3c664b8550452732e9e4ae3" title="unsigned 32-bit type">enet_uint32</a>  roundTripTimeoutLimit;
131<a name="l00148"></a>00148    <a class="code" href="types_8h.html#a5273659ca3c664b8550452732e9e4ae3" title="unsigned 32-bit type">enet_uint32</a>  fragmentOffset;
132<a name="l00149"></a>00149    <a class="code" href="types_8h.html#a245102585fdf31bdf208639ef47bec5d" title="unsigned 16-bit type">enet_uint16</a>  fragmentLength;
133<a name="l00150"></a>00150    <a class="code" href="types_8h.html#a245102585fdf31bdf208639ef47bec5d" title="unsigned 16-bit type">enet_uint16</a>  sendAttempts;
134<a name="l00151"></a>00151    <a class="code" href="union__ENetProtocol.html">ENetProtocol</a> command;
135<a name="l00152"></a>00152    <a class="code" href="struct__ENetPacket.html" title="ENet packet structure.">ENetPacket</a> * packet;
136<a name="l00153"></a>00153 } <a class="code" href="struct__ENetOutgoingCommand.html">ENetOutgoingCommand</a>;
137<a name="l00154"></a>00154 
138<a name="l00155"></a><a class="code" href="struct__ENetIncomingCommand.html">00155</a> <span class="keyword">typedef</span> <span class="keyword">struct </span><a class="code" href="struct__ENetIncomingCommand.html">_ENetIncomingCommand</a>
139<a name="l00156"></a>00156 {  
140<a name="l00157"></a>00157    <a class="code" href="struct__ENetListNode.html">ENetListNode</a>     incomingCommandList;
141<a name="l00158"></a>00158    <a class="code" href="types_8h.html#a245102585fdf31bdf208639ef47bec5d" title="unsigned 16-bit type">enet_uint16</a>      reliableSequenceNumber;
142<a name="l00159"></a>00159    <a class="code" href="types_8h.html#a245102585fdf31bdf208639ef47bec5d" title="unsigned 16-bit type">enet_uint16</a>      unreliableSequenceNumber;
143<a name="l00160"></a>00160    <a class="code" href="union__ENetProtocol.html">ENetProtocol</a>     command;
144<a name="l00161"></a>00161    <a class="code" href="types_8h.html#a5273659ca3c664b8550452732e9e4ae3" title="unsigned 32-bit type">enet_uint32</a>      fragmentCount;
145<a name="l00162"></a>00162    <a class="code" href="types_8h.html#a5273659ca3c664b8550452732e9e4ae3" title="unsigned 32-bit type">enet_uint32</a>      fragmentsRemaining;
146<a name="l00163"></a>00163    <a class="code" href="types_8h.html#a5273659ca3c664b8550452732e9e4ae3" title="unsigned 32-bit type">enet_uint32</a> *    fragments;
147<a name="l00164"></a>00164    <a class="code" href="struct__ENetPacket.html" title="ENet packet structure.">ENetPacket</a> *     packet;
148<a name="l00165"></a>00165 } <a class="code" href="struct__ENetIncomingCommand.html">ENetIncomingCommand</a>;
149<a name="l00166"></a>00166 
150<a name="l00167"></a>00167 <span class="keyword">typedef</span> <span class="keyword">enum</span> _ENetPeerState
151<a name="l00168"></a>00168 {
152<a name="l00169"></a>00169    ENET_PEER_STATE_DISCONNECTED                = 0,
153<a name="l00170"></a>00170    ENET_PEER_STATE_CONNECTING                  = 1,
154<a name="l00171"></a>00171    ENET_PEER_STATE_ACKNOWLEDGING_CONNECT       = 2,
155<a name="l00172"></a>00172    ENET_PEER_STATE_CONNECTION_PENDING          = 3,
156<a name="l00173"></a>00173    ENET_PEER_STATE_CONNECTION_SUCCEEDED        = 4,
157<a name="l00174"></a>00174    ENET_PEER_STATE_CONNECTED                   = 5,
158<a name="l00175"></a>00175    ENET_PEER_STATE_DISCONNECT_LATER            = 6,
159<a name="l00176"></a>00176    ENET_PEER_STATE_DISCONNECTING               = 7,
160<a name="l00177"></a>00177    ENET_PEER_STATE_ACKNOWLEDGING_DISCONNECT    = 8,
161<a name="l00178"></a>00178    ENET_PEER_STATE_ZOMBIE                      = 9 
162<a name="l00179"></a>00179 } ENetPeerState;
163<a name="l00180"></a>00180 
164<a name="l00181"></a>00181 <span class="preprocessor">#ifndef ENET_BUFFER_MAXIMUM</span>
165<a name="l00182"></a>00182 <span class="preprocessor"></span><span class="preprocessor">#define ENET_BUFFER_MAXIMUM (1 + 2 * ENET_PROTOCOL_MAXIMUM_PACKET_COMMANDS)</span>
166<a name="l00183"></a>00183 <span class="preprocessor"></span><span class="preprocessor">#endif</span>
167<a name="l00184"></a>00184 <span class="preprocessor"></span>
168<a name="l00185"></a>00185 <span class="keyword">enum</span>
169<a name="l00186"></a>00186 {
170<a name="l00187"></a>00187    ENET_HOST_RECEIVE_BUFFER_SIZE          = 256 * 1024,
171<a name="l00188"></a>00188    ENET_HOST_SEND_BUFFER_SIZE             = 256 * 1024,
172<a name="l00189"></a>00189    ENET_HOST_BANDWIDTH_THROTTLE_INTERVAL  = 1000,
173<a name="l00190"></a>00190    ENET_HOST_DEFAULT_MTU                  = 1400,
174<a name="l00191"></a>00191 
175<a name="l00192"></a>00192    ENET_PEER_DEFAULT_ROUND_TRIP_TIME      = 500,
176<a name="l00193"></a>00193    ENET_PEER_DEFAULT_PACKET_THROTTLE      = 32,
177<a name="l00194"></a>00194    ENET_PEER_PACKET_THROTTLE_SCALE        = 32,
178<a name="l00195"></a>00195    ENET_PEER_PACKET_THROTTLE_COUNTER      = 7, 
179<a name="l00196"></a>00196    ENET_PEER_PACKET_THROTTLE_ACCELERATION = 2,
180<a name="l00197"></a>00197    ENET_PEER_PACKET_THROTTLE_DECELERATION = 2,
181<a name="l00198"></a>00198    ENET_PEER_PACKET_THROTTLE_INTERVAL     = 5000,
182<a name="l00199"></a>00199    ENET_PEER_PACKET_LOSS_SCALE            = (1 &lt;&lt; 16),
183<a name="l00200"></a>00200    ENET_PEER_PACKET_LOSS_INTERVAL         = 10000,
184<a name="l00201"></a>00201    ENET_PEER_WINDOW_SIZE_SCALE            = 64 * 1024,
185<a name="l00202"></a>00202    ENET_PEER_TIMEOUT_LIMIT                = 32,
186<a name="l00203"></a>00203    ENET_PEER_TIMEOUT_MINIMUM              = 5000,
187<a name="l00204"></a>00204    ENET_PEER_TIMEOUT_MAXIMUM              = 30000,
188<a name="l00205"></a>00205    ENET_PEER_PING_INTERVAL                = 500,
189<a name="l00206"></a>00206    ENET_PEER_UNSEQUENCED_WINDOWS          = 64,
190<a name="l00207"></a>00207    ENET_PEER_UNSEQUENCED_WINDOW_SIZE      = 1024,
191<a name="l00208"></a>00208    ENET_PEER_FREE_UNSEQUENCED_WINDOWS     = 32,
192<a name="l00209"></a>00209    ENET_PEER_RELIABLE_WINDOWS             = 16,
193<a name="l00210"></a>00210    ENET_PEER_RELIABLE_WINDOW_SIZE         = 0x1000,
194<a name="l00211"></a>00211    ENET_PEER_FREE_RELIABLE_WINDOWS        = 8
195<a name="l00212"></a>00212 };
196<a name="l00213"></a>00213 
197<a name="l00214"></a><a class="code" href="struct__ENetChannel.html">00214</a> <span class="keyword">typedef</span> <span class="keyword">struct </span><a class="code" href="struct__ENetChannel.html">_ENetChannel</a>
198<a name="l00215"></a>00215 {
199<a name="l00216"></a>00216    <a class="code" href="types_8h.html#a245102585fdf31bdf208639ef47bec5d" title="unsigned 16-bit type">enet_uint16</a>  outgoingReliableSequenceNumber;
200<a name="l00217"></a>00217    <a class="code" href="types_8h.html#a245102585fdf31bdf208639ef47bec5d" title="unsigned 16-bit type">enet_uint16</a>  outgoingUnreliableSequenceNumber;
201<a name="l00218"></a>00218    <a class="code" href="types_8h.html#a245102585fdf31bdf208639ef47bec5d" title="unsigned 16-bit type">enet_uint16</a>  usedReliableWindows;
202<a name="l00219"></a>00219    <a class="code" href="types_8h.html#a245102585fdf31bdf208639ef47bec5d" title="unsigned 16-bit type">enet_uint16</a>  reliableWindows [ENET_PEER_RELIABLE_WINDOWS];
203<a name="l00220"></a>00220    <a class="code" href="types_8h.html#a245102585fdf31bdf208639ef47bec5d" title="unsigned 16-bit type">enet_uint16</a>  incomingReliableSequenceNumber;
204<a name="l00221"></a>00221    <a class="code" href="struct__ENetList.html">ENetList</a>     incomingReliableCommands;
205<a name="l00222"></a>00222    <a class="code" href="struct__ENetList.html">ENetList</a>     incomingUnreliableCommands;
206<a name="l00223"></a>00223 } <a class="code" href="struct__ENetChannel.html">ENetChannel</a>;
207<a name="l00224"></a>00224 
208<a name="l00230"></a><a class="code" href="struct__ENetPeer.html">00230</a> <span class="keyword">typedef</span> <span class="keyword">struct </span><a class="code" href="struct__ENetPeer.html" title="An ENet peer which data packets may be sent or received from.">_ENetPeer</a>
209<a name="l00231"></a>00231 { 
210<a name="l00232"></a>00232    <a class="code" href="struct__ENetListNode.html">ENetListNode</a>  dispatchList;
211<a name="l00233"></a>00233    <span class="keyword">struct </span><a class="code" href="struct__ENetHost.html" title="An ENet host for communicating with peers.">_ENetHost</a> * host;
212<a name="l00234"></a>00234    <a class="code" href="types_8h.html#a245102585fdf31bdf208639ef47bec5d" title="unsigned 16-bit type">enet_uint16</a>   outgoingPeerID;
213<a name="l00235"></a>00235    <a class="code" href="types_8h.html#a245102585fdf31bdf208639ef47bec5d" title="unsigned 16-bit type">enet_uint16</a>   incomingPeerID;
214<a name="l00236"></a>00236    <a class="code" href="types_8h.html#a5273659ca3c664b8550452732e9e4ae3" title="unsigned 32-bit type">enet_uint32</a>   connectID;
215<a name="l00237"></a>00237    <a class="code" href="types_8h.html#a34ce80c65abc6389fe0121a83d757f07" title="unsigned 8-bit type">enet_uint8</a>    outgoingSessionID;
216<a name="l00238"></a>00238    <a class="code" href="types_8h.html#a34ce80c65abc6389fe0121a83d757f07" title="unsigned 8-bit type">enet_uint8</a>    incomingSessionID;
217<a name="l00239"></a><a class="code" href="struct__ENetPeer.html#a409cfc46d0ccd860552650369704aabe">00239</a>    <a class="code" href="struct__ENetAddress.html" title="Portable internet address structure.">ENetAddress</a>   <a class="code" href="struct__ENetPeer.html#a409cfc46d0ccd860552650369704aabe" title="Internet address of the peer.">address</a>;            
218<a name="l00240"></a><a class="code" href="struct__ENetPeer.html#acf49b1be64329c23b6c71c2192770673">00240</a>    <span class="keywordtype">void</span> *        <a class="code" href="struct__ENetPeer.html#acf49b1be64329c23b6c71c2192770673" title="Application private data, may be freely modified.">data</a>;               
219<a name="l00241"></a>00241    ENetPeerState state;
220<a name="l00242"></a>00242    <a class="code" href="struct__ENetChannel.html">ENetChannel</a> * channels;
221<a name="l00243"></a><a class="code" href="struct__ENetPeer.html#a937b3acec315f862b5012ae1d89159af">00243</a>    <span class="keywordtype">size_t</span>        <a class="code" href="struct__ENetPeer.html#a937b3acec315f862b5012ae1d89159af" title="Number of channels allocated for communication with peer.">channelCount</a>;       
222<a name="l00244"></a><a class="code" href="struct__ENetPeer.html#a0636b6dde4c71255d39dbdd0c2f734d9">00244</a>    <a class="code" href="types_8h.html#a5273659ca3c664b8550452732e9e4ae3" title="unsigned 32-bit type">enet_uint32</a>   <a class="code" href="struct__ENetPeer.html#a0636b6dde4c71255d39dbdd0c2f734d9" title="Downstream bandwidth of the client in bytes/second.">incomingBandwidth</a>;  
223<a name="l00245"></a><a class="code" href="struct__ENetPeer.html#a11d187402e8b0df357a8763145aa72e0">00245</a>    <a class="code" href="types_8h.html#a5273659ca3c664b8550452732e9e4ae3" title="unsigned 32-bit type">enet_uint32</a>   <a class="code" href="struct__ENetPeer.html#a11d187402e8b0df357a8763145aa72e0" title="Upstream bandwidth of the client in bytes/second.">outgoingBandwidth</a>;  
224<a name="l00246"></a>00246    <a class="code" href="types_8h.html#a5273659ca3c664b8550452732e9e4ae3" title="unsigned 32-bit type">enet_uint32</a>   incomingBandwidthThrottleEpoch;
225<a name="l00247"></a>00247    <a class="code" href="types_8h.html#a5273659ca3c664b8550452732e9e4ae3" title="unsigned 32-bit type">enet_uint32</a>   outgoingBandwidthThrottleEpoch;
226<a name="l00248"></a>00248    <a class="code" href="types_8h.html#a5273659ca3c664b8550452732e9e4ae3" title="unsigned 32-bit type">enet_uint32</a>   incomingDataTotal;
227<a name="l00249"></a>00249    <a class="code" href="types_8h.html#a5273659ca3c664b8550452732e9e4ae3" title="unsigned 32-bit type">enet_uint32</a>   outgoingDataTotal;
228<a name="l00250"></a>00250    <a class="code" href="types_8h.html#a5273659ca3c664b8550452732e9e4ae3" title="unsigned 32-bit type">enet_uint32</a>   lastSendTime;
229<a name="l00251"></a>00251    <a class="code" href="types_8h.html#a5273659ca3c664b8550452732e9e4ae3" title="unsigned 32-bit type">enet_uint32</a>   lastReceiveTime;
230<a name="l00252"></a>00252    <a class="code" href="types_8h.html#a5273659ca3c664b8550452732e9e4ae3" title="unsigned 32-bit type">enet_uint32</a>   nextTimeout;
231<a name="l00253"></a>00253    <a class="code" href="types_8h.html#a5273659ca3c664b8550452732e9e4ae3" title="unsigned 32-bit type">enet_uint32</a>   earliestTimeout;
232<a name="l00254"></a>00254    <a class="code" href="types_8h.html#a5273659ca3c664b8550452732e9e4ae3" title="unsigned 32-bit type">enet_uint32</a>   packetLossEpoch;
233<a name="l00255"></a>00255    <a class="code" href="types_8h.html#a5273659ca3c664b8550452732e9e4ae3" title="unsigned 32-bit type">enet_uint32</a>   packetsSent;
234<a name="l00256"></a>00256    <a class="code" href="types_8h.html#a5273659ca3c664b8550452732e9e4ae3" title="unsigned 32-bit type">enet_uint32</a>   packetsLost;
235<a name="l00257"></a><a class="code" href="struct__ENetPeer.html#aa3cb07744c06c39287457127fadd88e4">00257</a>    <a class="code" href="types_8h.html#a5273659ca3c664b8550452732e9e4ae3" title="unsigned 32-bit type">enet_uint32</a>   <a class="code" href="struct__ENetPeer.html#aa3cb07744c06c39287457127fadd88e4" title="mean packet loss of reliable packets as a ratio with respect to the constant ENET_PEER_PACKET_LOSS_SC...">packetLoss</a>;          
236<a name="l00258"></a>00258    <a class="code" href="types_8h.html#a5273659ca3c664b8550452732e9e4ae3" title="unsigned 32-bit type">enet_uint32</a>   packetLossVariance;
237<a name="l00259"></a>00259    <a class="code" href="types_8h.html#a5273659ca3c664b8550452732e9e4ae3" title="unsigned 32-bit type">enet_uint32</a>   packetThrottle;
238<a name="l00260"></a>00260    <a class="code" href="types_8h.html#a5273659ca3c664b8550452732e9e4ae3" title="unsigned 32-bit type">enet_uint32</a>   packetThrottleLimit;
239<a name="l00261"></a>00261    <a class="code" href="types_8h.html#a5273659ca3c664b8550452732e9e4ae3" title="unsigned 32-bit type">enet_uint32</a>   packetThrottleCounter;
240<a name="l00262"></a>00262    <a class="code" href="types_8h.html#a5273659ca3c664b8550452732e9e4ae3" title="unsigned 32-bit type">enet_uint32</a>   packetThrottleEpoch;
241<a name="l00263"></a>00263    <a class="code" href="types_8h.html#a5273659ca3c664b8550452732e9e4ae3" title="unsigned 32-bit type">enet_uint32</a>   packetThrottleAcceleration;
242<a name="l00264"></a>00264    <a class="code" href="types_8h.html#a5273659ca3c664b8550452732e9e4ae3" title="unsigned 32-bit type">enet_uint32</a>   packetThrottleDeceleration;
243<a name="l00265"></a>00265    <a class="code" href="types_8h.html#a5273659ca3c664b8550452732e9e4ae3" title="unsigned 32-bit type">enet_uint32</a>   packetThrottleInterval;
244<a name="l00266"></a>00266    <a class="code" href="types_8h.html#a5273659ca3c664b8550452732e9e4ae3" title="unsigned 32-bit type">enet_uint32</a>   lastRoundTripTime;
245<a name="l00267"></a>00267    <a class="code" href="types_8h.html#a5273659ca3c664b8550452732e9e4ae3" title="unsigned 32-bit type">enet_uint32</a>   lowestRoundTripTime;
246<a name="l00268"></a>00268    <a class="code" href="types_8h.html#a5273659ca3c664b8550452732e9e4ae3" title="unsigned 32-bit type">enet_uint32</a>   lastRoundTripTimeVariance;
247<a name="l00269"></a>00269    <a class="code" href="types_8h.html#a5273659ca3c664b8550452732e9e4ae3" title="unsigned 32-bit type">enet_uint32</a>   highestRoundTripTimeVariance;
248<a name="l00270"></a><a class="code" href="struct__ENetPeer.html#a6b14a8da10acf4de462ae475c71f34d6">00270</a>    <a class="code" href="types_8h.html#a5273659ca3c664b8550452732e9e4ae3" title="unsigned 32-bit type">enet_uint32</a>   <a class="code" href="struct__ENetPeer.html#a6b14a8da10acf4de462ae475c71f34d6" title="mean round trip time (RTT), in milliseconds, between sending a reliable packet and receiving its ackn...">roundTripTime</a>;            
249<a name="l00271"></a>00271    <a class="code" href="types_8h.html#a5273659ca3c664b8550452732e9e4ae3" title="unsigned 32-bit type">enet_uint32</a>   roundTripTimeVariance;
250<a name="l00272"></a>00272    <a class="code" href="types_8h.html#a5273659ca3c664b8550452732e9e4ae3" title="unsigned 32-bit type">enet_uint32</a>   mtu;
251<a name="l00273"></a>00273    <a class="code" href="types_8h.html#a5273659ca3c664b8550452732e9e4ae3" title="unsigned 32-bit type">enet_uint32</a>   windowSize;
252<a name="l00274"></a>00274    <a class="code" href="types_8h.html#a5273659ca3c664b8550452732e9e4ae3" title="unsigned 32-bit type">enet_uint32</a>   reliableDataInTransit;
253<a name="l00275"></a>00275    <a class="code" href="types_8h.html#a245102585fdf31bdf208639ef47bec5d" title="unsigned 16-bit type">enet_uint16</a>   outgoingReliableSequenceNumber;
254<a name="l00276"></a>00276    <a class="code" href="struct__ENetList.html">ENetList</a>      acknowledgements;
255<a name="l00277"></a>00277    <a class="code" href="struct__ENetList.html">ENetList</a>      sentReliableCommands;
256<a name="l00278"></a>00278    <a class="code" href="struct__ENetList.html">ENetList</a>      sentUnreliableCommands;
257<a name="l00279"></a>00279    <a class="code" href="struct__ENetList.html">ENetList</a>      outgoingReliableCommands;
258<a name="l00280"></a>00280    <a class="code" href="struct__ENetList.html">ENetList</a>      outgoingUnreliableCommands;
259<a name="l00281"></a>00281    <a class="code" href="struct__ENetList.html">ENetList</a>      dispatchedCommands;
260<a name="l00282"></a>00282    <span class="keywordtype">int</span>           needsDispatch;
261<a name="l00283"></a>00283    <a class="code" href="types_8h.html#a245102585fdf31bdf208639ef47bec5d" title="unsigned 16-bit type">enet_uint16</a>   incomingUnsequencedGroup;
262<a name="l00284"></a>00284    <a class="code" href="types_8h.html#a245102585fdf31bdf208639ef47bec5d" title="unsigned 16-bit type">enet_uint16</a>   outgoingUnsequencedGroup;
263<a name="l00285"></a>00285    <a class="code" href="types_8h.html#a5273659ca3c664b8550452732e9e4ae3" title="unsigned 32-bit type">enet_uint32</a>   unsequencedWindow [ENET_PEER_UNSEQUENCED_WINDOW_SIZE / 32]; 
264<a name="l00286"></a>00286    <a class="code" href="types_8h.html#a5273659ca3c664b8550452732e9e4ae3" title="unsigned 32-bit type">enet_uint32</a>   eventData;
265<a name="l00287"></a>00287 } <a class="code" href="struct__ENetPeer.html" title="An ENet peer which data packets may be sent or received from.">ENetPeer</a>;
266<a name="l00288"></a>00288 
267<a name="l00291"></a><a class="code" href="struct__ENetCompressor.html">00291</a> <span class="keyword">typedef</span> <span class="keyword">struct </span><a class="code" href="struct__ENetCompressor.html" title="An ENet packet compressor for compressing UDP packets before socket sends or receives.">_ENetCompressor</a>
268<a name="l00292"></a>00292 {
269<a name="l00294"></a><a class="code" href="struct__ENetCompressor.html#a2818b3832d2809386ff7659d057acdc6">00294</a>    <span class="keywordtype">void</span> * <a class="code" href="struct__ENetCompressor.html#a2818b3832d2809386ff7659d057acdc6" title="Context data for the compressor.">context</a>;
270<a name="l00296"></a>00296    <a class="code" href="struct__ENetCompressor.html#a9cb68aad5a5762d43a003176278a937f" title="Compresses from inBuffers[0:inBufferCount-1], containing inLimit bytes, to outData, outputting at most outLimit bytes.">size_t</a> (ENET_CALLBACK * compress) (<span class="keywordtype">void</span> * <a class="code" href="struct__ENetCompressor.html#a2818b3832d2809386ff7659d057acdc6" title="Context data for the compressor.">context</a>, <span class="keyword">const</span> <a class="code" href="structENetBuffer.html">ENetBuffer</a> * inBuffers, <span class="keywordtype">size_t</span> inBufferCount, <span class="keywordtype">size_t</span> inLimit, <a class="code" href="types_8h.html#a34ce80c65abc6389fe0121a83d757f07" title="unsigned 8-bit type">enet_uint8</a> * outData, <span class="keywordtype">size_t</span> outLimit);
271<a name="l00298"></a>00298    <a class="code" href="struct__ENetCompressor.html#a9cb68aad5a5762d43a003176278a937f" title="Compresses from inBuffers[0:inBufferCount-1], containing inLimit bytes, to outData, outputting at most outLimit bytes.">size_t</a> (ENET_CALLBACK * decompress) (<span class="keywordtype">void</span> * <a class="code" href="struct__ENetCompressor.html#a2818b3832d2809386ff7659d057acdc6" title="Context data for the compressor.">context</a>, <span class="keyword">const</span> <a class="code" href="types_8h.html#a34ce80c65abc6389fe0121a83d757f07" title="unsigned 8-bit type">enet_uint8</a> * inData, <span class="keywordtype">size_t</span> inLimit, <a class="code" href="types_8h.html#a34ce80c65abc6389fe0121a83d757f07" title="unsigned 8-bit type">enet_uint8</a> * outData, <span class="keywordtype">size_t</span> outLimit);
272<a name="l00300"></a>00300    <a class="code" href="struct__ENetCompressor.html#aecfdee2cfc56760079096d1528db389f" title="Destroys the context when compression is disabled or the host is destroyed.">void</a> (ENET_CALLBACK * destroy) (<span class="keywordtype">void</span> * <a class="code" href="struct__ENetCompressor.html#a2818b3832d2809386ff7659d057acdc6" title="Context data for the compressor.">context</a>);
273<a name="l00301"></a>00301 } <a class="code" href="struct__ENetCompressor.html" title="An ENet packet compressor for compressing UDP packets before socket sends or receives.">ENetCompressor</a>;
274<a name="l00302"></a>00302 
275<a name="l00304"></a>00304 <span class="keyword">typedef</span> <a class="code" href="types_8h.html#a5273659ca3c664b8550452732e9e4ae3" title="unsigned 32-bit type">enet_uint32</a> (ENET_CALLBACK * ENetChecksumCallback) (<span class="keyword">const</span> <a class="code" href="structENetBuffer.html">ENetBuffer</a> * buffers, <span class="keywordtype">size_t</span> bufferCount);
276<a name="l00305"></a>00305  
277<a name="l00322"></a><a class="code" href="struct__ENetHost.html">00322</a> <span class="keyword">typedef</span> <span class="keyword">struct </span><a class="code" href="struct__ENetHost.html" title="An ENet host for communicating with peers.">_ENetHost</a>
278<a name="l00323"></a>00323 {
279<a name="l00324"></a>00324    ENetSocket           socket;
280<a name="l00325"></a><a class="code" href="struct__ENetHost.html#add2825b56199fbeae1c21401829bde7f">00325</a>    <a class="code" href="struct__ENetAddress.html" title="Portable internet address structure.">ENetAddress</a>          <a class="code" href="struct__ENetHost.html#add2825b56199fbeae1c21401829bde7f" title="Internet address of the host.">address</a>;                     
281<a name="l00326"></a><a class="code" href="struct__ENetHost.html#aba842c157f1edbd616b0879c0560f018">00326</a>    <a class="code" href="types_8h.html#a5273659ca3c664b8550452732e9e4ae3" title="unsigned 32-bit type">enet_uint32</a>          <a class="code" href="struct__ENetHost.html#aba842c157f1edbd616b0879c0560f018" title="downstream bandwidth of the host">incomingBandwidth</a>;           
282<a name="l00327"></a><a class="code" href="struct__ENetHost.html#afb9425727abfafd13dc44fec124c9834">00327</a>    <a class="code" href="types_8h.html#a5273659ca3c664b8550452732e9e4ae3" title="unsigned 32-bit type">enet_uint32</a>          <a class="code" href="struct__ENetHost.html#afb9425727abfafd13dc44fec124c9834" title="upstream bandwidth of the host">outgoingBandwidth</a>;           
283<a name="l00328"></a>00328    <a class="code" href="types_8h.html#a5273659ca3c664b8550452732e9e4ae3" title="unsigned 32-bit type">enet_uint32</a>          bandwidthThrottleEpoch;
284<a name="l00329"></a>00329    <a class="code" href="types_8h.html#a5273659ca3c664b8550452732e9e4ae3" title="unsigned 32-bit type">enet_uint32</a>          mtu;
285<a name="l00330"></a>00330    <a class="code" href="types_8h.html#a5273659ca3c664b8550452732e9e4ae3" title="unsigned 32-bit type">enet_uint32</a>          randomSeed;
286<a name="l00331"></a>00331    <span class="keywordtype">int</span>                  recalculateBandwidthLimits;
287<a name="l00332"></a><a class="code" href="struct__ENetHost.html#afe5102e5cb5df101a763806f50a20ca5">00332</a>    <a class="code" href="struct__ENetPeer.html" title="An ENet peer which data packets may be sent or received from.">ENetPeer</a> *           <a class="code" href="struct__ENetHost.html#afe5102e5cb5df101a763806f50a20ca5" title="array of peers allocated for this host">peers</a>;                       
288<a name="l00333"></a><a class="code" href="struct__ENetHost.html#a91f7d21a235270a7e81b640ca4d224e1">00333</a>    <span class="keywordtype">size_t</span>               <a class="code" href="struct__ENetHost.html#a91f7d21a235270a7e81b640ca4d224e1" title="number of peers allocated for this host">peerCount</a>;                   
289<a name="l00334"></a><a class="code" href="struct__ENetHost.html#a4d6a3cbb04707139fbb0b5eddfa2d0c7">00334</a>    <span class="keywordtype">size_t</span>               <a class="code" href="struct__ENetHost.html#a4d6a3cbb04707139fbb0b5eddfa2d0c7" title="maximum number of channels allowed for connected peers">channelLimit</a>;                
290<a name="l00335"></a>00335    <a class="code" href="types_8h.html#a5273659ca3c664b8550452732e9e4ae3" title="unsigned 32-bit type">enet_uint32</a>          serviceTime;
291<a name="l00336"></a>00336    <a class="code" href="struct__ENetList.html">ENetList</a>             dispatchQueue;
292<a name="l00337"></a>00337    <span class="keywordtype">int</span>                  continueSending;
293<a name="l00338"></a>00338    <span class="keywordtype">size_t</span>               packetSize;
294<a name="l00339"></a>00339    <a class="code" href="types_8h.html#a245102585fdf31bdf208639ef47bec5d" title="unsigned 16-bit type">enet_uint16</a>          headerFlags;
295<a name="l00340"></a>00340    <a class="code" href="union__ENetProtocol.html">ENetProtocol</a>         commands [ENET_PROTOCOL_MAXIMUM_PACKET_COMMANDS];
296<a name="l00341"></a>00341    <span class="keywordtype">size_t</span>               commandCount;
297<a name="l00342"></a>00342    <a class="code" href="structENetBuffer.html">ENetBuffer</a>           buffers [ENET_BUFFER_MAXIMUM];
298<a name="l00343"></a>00343    <span class="keywordtype">size_t</span>               bufferCount;
299<a name="l00344"></a><a class="code" href="struct__ENetHost.html#a8540e8bb32c1af0099791f86a06b6b69">00344</a>    ENetChecksumCallback <a class="code" href="struct__ENetHost.html#a8540e8bb32c1af0099791f86a06b6b69" title="callback the user can set to enable packet checksums for this host">checksum</a>;                    
300<a name="l00345"></a>00345    <a class="code" href="struct__ENetCompressor.html" title="An ENet packet compressor for compressing UDP packets before socket sends or receives.">ENetCompressor</a>       compressor;
301<a name="l00346"></a>00346    <a class="code" href="types_8h.html#a34ce80c65abc6389fe0121a83d757f07" title="unsigned 8-bit type">enet_uint8</a>           packetData [2][ENET_PROTOCOL_MAXIMUM_MTU];
302<a name="l00347"></a>00347    <a class="code" href="struct__ENetAddress.html" title="Portable internet address structure.">ENetAddress</a>          receivedAddress;
303<a name="l00348"></a>00348    <a class="code" href="types_8h.html#a34ce80c65abc6389fe0121a83d757f07" title="unsigned 8-bit type">enet_uint8</a> *         receivedData;
304<a name="l00349"></a>00349    <span class="keywordtype">size_t</span>               receivedDataLength;
305<a name="l00350"></a><a class="code" href="struct__ENetHost.html#a689cd80fdcebebde7a23b8d90ce256ad">00350</a>    <a class="code" href="types_8h.html#a5273659ca3c664b8550452732e9e4ae3" title="unsigned 32-bit type">enet_uint32</a>          <a class="code" href="struct__ENetHost.html#a689cd80fdcebebde7a23b8d90ce256ad" title="total data sent, user should reset to 0 as needed to prevent overflow">totalSentData</a>;               
306<a name="l00351"></a><a class="code" href="struct__ENetHost.html#a091427500ee4ef3e334391d946c3fd4e">00351</a>    <a class="code" href="types_8h.html#a5273659ca3c664b8550452732e9e4ae3" title="unsigned 32-bit type">enet_uint32</a>          <a class="code" href="struct__ENetHost.html#a091427500ee4ef3e334391d946c3fd4e" title="total UDP packets sent, user should reset to 0 as needed to prevent overflow">totalSentPackets</a>;            
307<a name="l00352"></a><a class="code" href="struct__ENetHost.html#a2f64a35db39c2d63faac1307cda04e72">00352</a>    <a class="code" href="types_8h.html#a5273659ca3c664b8550452732e9e4ae3" title="unsigned 32-bit type">enet_uint32</a>          <a class="code" href="struct__ENetHost.html#a2f64a35db39c2d63faac1307cda04e72" title="total data received, user should reset to 0 as needed to prevent overflow">totalReceivedData</a>;           
308<a name="l00353"></a><a class="code" href="struct__ENetHost.html#af3dbafc09cdc17fc4e931eb2eb0c5680">00353</a>    <a class="code" href="types_8h.html#a5273659ca3c664b8550452732e9e4ae3" title="unsigned 32-bit type">enet_uint32</a>          <a class="code" href="struct__ENetHost.html#af3dbafc09cdc17fc4e931eb2eb0c5680" title="total UDP packets received, user should reset to 0 as needed to prevent overflow">totalReceivedPackets</a>;        
309<a name="l00354"></a>00354 } <a class="code" href="struct__ENetHost.html" title="An ENet host for communicating with peers.">ENetHost</a>;
310<a name="l00355"></a>00355 
311<a name="l00359"></a><a class="code" href="enet_8h.html#a3cf937b5cf72510493e0a7a2b71d3755">00359</a> <span class="keyword">typedef</span> <span class="keyword">enum</span> <a class="code" href="enet_8h.html#a3cf937b5cf72510493e0a7a2b71d3755" title="An ENet event type, as specified in ENetEvent.">_ENetEventType</a>
312<a name="l00360"></a>00360 {
313<a name="l00362"></a><a class="code" href="enet_8h.html#a3cf937b5cf72510493e0a7a2b71d3755ad76c1d9192a5c6ac60a3820e3d7379c5">00362</a>    <a class="code" href="enet_8h.html#a3cf937b5cf72510493e0a7a2b71d3755ad76c1d9192a5c6ac60a3820e3d7379c5" title="no event occurred within the specified time limit">ENET_EVENT_TYPE_NONE</a>       = 0,  
314<a name="l00363"></a>00363 
315<a name="l00367"></a><a class="code" href="enet_8h.html#a3cf937b5cf72510493e0a7a2b71d3755aefd9fa36297e41ca4c1cbcfdeb7e4a9d">00367</a>    <a class="code" href="enet_8h.html#a3cf937b5cf72510493e0a7a2b71d3755aefd9fa36297e41ca4c1cbcfdeb7e4a9d" title="a connection request initiated by enet_host_connect has completed.">ENET_EVENT_TYPE_CONNECT</a>    = 1,  
316<a name="l00368"></a>00368 
317<a name="l00376"></a><a class="code" href="enet_8h.html#a3cf937b5cf72510493e0a7a2b71d3755a4fa47af84cf901810510aeba077a1c2f">00376</a>    <a class="code" href="enet_8h.html#a3cf937b5cf72510493e0a7a2b71d3755a4fa47af84cf901810510aeba077a1c2f" title="a peer has disconnected.">ENET_EVENT_TYPE_DISCONNECT</a> = 2,  
318<a name="l00377"></a>00377 
319<a name="l00384"></a><a class="code" href="enet_8h.html#a3cf937b5cf72510493e0a7a2b71d3755a67d928ca38b289db53ec9f56c91c5d9d">00384</a>    <a class="code" href="enet_8h.html#a3cf937b5cf72510493e0a7a2b71d3755a67d928ca38b289db53ec9f56c91c5d9d" title="a packet has been received from a peer.">ENET_EVENT_TYPE_RECEIVE</a>    = 3
320<a name="l00385"></a>00385 } ENetEventType;
321<a name="l00386"></a>00386 
322<a name="l00392"></a><a class="code" href="struct__ENetEvent.html">00392</a> <span class="keyword">typedef</span> <span class="keyword">struct </span><a class="code" href="struct__ENetEvent.html" title="An ENet event as returned by enet_host_service().">_ENetEvent</a> 
323<a name="l00393"></a>00393 {
324<a name="l00394"></a><a class="code" href="struct__ENetEvent.html#a53cd59a74e46de03e8f4b3fd47822d96">00394</a>    <a class="code" href="enet_8h.html#a7cf9271483e2ed25d8ecb72068222dd6" title="An ENet event type, as specified in ENetEvent.">ENetEventType</a>        <a class="code" href="struct__ENetEvent.html#a53cd59a74e46de03e8f4b3fd47822d96" title="type of the event">type</a>;      
325<a name="l00395"></a><a class="code" href="struct__ENetEvent.html#ac991d0db800bc1c70b56ad63f1670140">00395</a>    <a class="code" href="struct__ENetPeer.html" title="An ENet peer which data packets may be sent or received from.">ENetPeer</a> *           <a class="code" href="struct__ENetEvent.html#ac991d0db800bc1c70b56ad63f1670140" title="peer that generated a connect, disconnect or receive event">peer</a>;      
326<a name="l00396"></a><a class="code" href="struct__ENetEvent.html#a9d82e67a0f26c05de4b39bc839cb36ec">00396</a>    <a class="code" href="types_8h.html#a34ce80c65abc6389fe0121a83d757f07" title="unsigned 8-bit type">enet_uint8</a>           <a class="code" href="struct__ENetEvent.html#a9d82e67a0f26c05de4b39bc839cb36ec" title="channel on the peer that generated the event, if appropriate">channelID</a>; 
327<a name="l00397"></a><a class="code" href="struct__ENetEvent.html#a661ec4aac2ab15159b3da9e16175c3f4">00397</a>    <a class="code" href="types_8h.html#a5273659ca3c664b8550452732e9e4ae3" title="unsigned 32-bit type">enet_uint32</a>          <a class="code" href="struct__ENetEvent.html#a661ec4aac2ab15159b3da9e16175c3f4" title="data associated with the event, if appropriate">data</a>;      
328<a name="l00398"></a><a class="code" href="struct__ENetEvent.html#afb6303a5593fce6b9671efbc2ca1b5de">00398</a>    <a class="code" href="struct__ENetPacket.html" title="ENet packet structure.">ENetPacket</a> *         <a class="code" href="struct__ENetEvent.html#afb6303a5593fce6b9671efbc2ca1b5de" title="packet associated with the event, if appropriate">packet</a>;    
329<a name="l00399"></a>00399 } <a class="code" href="struct__ENetEvent.html" title="An ENet event as returned by enet_host_service().">ENetEvent</a>;
330<a name="l00400"></a>00400 
331<a name="l00410"></a>00410 ENET_API <span class="keywordtype">int</span> <a class="code" href="group__global.html#ga67fa85c46a1dc91f968f25fc0637c897" title="Initializes ENet globally.">enet_initialize</a> (<span class="keywordtype">void</span>);
332<a name="l00411"></a>00411 
333<a name="l00419"></a>00419 ENET_API <span class="keywordtype">int</span> <a class="code" href="group__global.html#gaef1e7849f3ddde18c6a30f32783c899d" title="Initializes ENet globally and supplies user-overridden callbacks.">enet_initialize_with_callbacks</a> (ENetVersion version, <span class="keyword">const</span> <a class="code" href="struct__ENetCallbacks.html">ENetCallbacks</a> * inits);
334<a name="l00420"></a>00420 
335<a name="l00425"></a>00425 ENET_API <span class="keywordtype">void</span> <a class="code" href="group__global.html#gad62cf417e08a2b98d48572a336f7db25" title="Shuts down ENet globally.">enet_deinitialize</a> (<span class="keywordtype">void</span>);
336<a name="l00426"></a>00426 
337<a name="l00435"></a>00435 ENET_API <a class="code" href="types_8h.html#a5273659ca3c664b8550452732e9e4ae3" title="unsigned 32-bit type">enet_uint32</a> <a class="code" href="enet_8h.html#a3d60275f78985d9aaba12c2fad13c37f" title="Returns the wall-time in milliseconds.">enet_time_get</a> (<span class="keywordtype">void</span>);
338<a name="l00439"></a>00439 ENET_API <span class="keywordtype">void</span> <a class="code" href="enet_8h.html#a820cd12062e6fabcbfd3c24c4759e8ca" title="Sets the current wall-time in milliseconds.">enet_time_set</a> (<a class="code" href="types_8h.html#a5273659ca3c664b8550452732e9e4ae3" title="unsigned 32-bit type">enet_uint32</a>);
339<a name="l00440"></a>00440 
340<a name="l00444"></a>00444 ENET_API ENetSocket enet_socket_create (ENetSocketType);
341<a name="l00445"></a>00445 ENET_API <span class="keywordtype">int</span>        enet_socket_bind (ENetSocket, <span class="keyword">const</span> <a class="code" href="struct__ENetAddress.html" title="Portable internet address structure.">ENetAddress</a> *);
342<a name="l00446"></a>00446 ENET_API <span class="keywordtype">int</span>        enet_socket_listen (ENetSocket, <span class="keywordtype">int</span>);
343<a name="l00447"></a>00447 ENET_API ENetSocket enet_socket_accept (ENetSocket, <a class="code" href="struct__ENetAddress.html" title="Portable internet address structure.">ENetAddress</a> *);
344<a name="l00448"></a>00448 ENET_API <span class="keywordtype">int</span>        enet_socket_connect (ENetSocket, <span class="keyword">const</span> <a class="code" href="struct__ENetAddress.html" title="Portable internet address structure.">ENetAddress</a> *);
345<a name="l00449"></a>00449 ENET_API <span class="keywordtype">int</span>        enet_socket_send (ENetSocket, <span class="keyword">const</span> <a class="code" href="struct__ENetAddress.html" title="Portable internet address structure.">ENetAddress</a> *, <span class="keyword">const</span> <a class="code" href="structENet…

Large files files are truncated, but you can click here to view the full file