PacketPriority_8h.html 14 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179
  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. <meta http-equiv="X-UA-Compatible" content="IE=9"/>
  6. <title>RakNet: D:/temp/RakNet_PC/Source/PacketPriority.h File Reference</title>
  7. <link href="tabs.css" rel="stylesheet" type="text/css"/>
  8. <script type="text/javascript" src="jquery.js"></script>
  9. <script type="text/javascript" src="dynsections.js"></script>
  10. <link href="doxygen.css" rel="stylesheet" type="text/css" />
  11. </head>
  12. <body>
  13. <div id="top"><!-- do not remove this div, it is closed by doxygen! -->
  14. <div id="titlearea">
  15. <table cellspacing="0" cellpadding="0">
  16. <tbody>
  17. <tr style="height: 56px;">
  18. <td style="padding-left: 0.5em;">
  19. <div id="projectname">RakNet
  20. &#160;<span id="projectnumber">4.0</span>
  21. </div>
  22. </td>
  23. </tr>
  24. </tbody>
  25. </table>
  26. </div>
  27. <!-- end header part -->
  28. <!-- Generated by Doxygen 1.8.2 -->
  29. <div id="navrow1" class="tabs">
  30. <ul class="tablist">
  31. <li><a href="index.html"><span>Main&#160;Page</span></a></li>
  32. <li><a href="pages.html"><span>Related&#160;Pages</span></a></li>
  33. <li><a href="modules.html"><span>Modules</span></a></li>
  34. <li><a href="namespaces.html"><span>Namespaces</span></a></li>
  35. <li><a href="annotated.html"><span>Classes</span></a></li>
  36. <li class="current"><a href="files.html"><span>Files</span></a></li>
  37. </ul>
  38. </div>
  39. <div id="navrow2" class="tabs2">
  40. <ul class="tablist">
  41. <li><a href="files.html"><span>File&#160;List</span></a></li>
  42. <li><a href="globals.html"><span>File&#160;Members</span></a></li>
  43. </ul>
  44. </div>
  45. <div id="nav-path" class="navpath">
  46. <ul>
  47. <li class="navelem"><a class="el" href="dir_275089585c7fc1b5fd5d7d42c69cb1da.html">D:</a></li><li class="navelem"><a class="el" href="dir_d349b3b4492d120fadf36aec47a37604.html">temp</a></li><li class="navelem"><a class="el" href="dir_6cd9e47870b2cdd158ab62465a0b9bce.html">RakNet_PC</a></li><li class="navelem"><a class="el" href="dir_474ce5450895b8d9723668375859ccbf.html">Source</a></li> </ul>
  48. </div>
  49. </div><!-- top -->
  50. <div class="header">
  51. <div class="summary">
  52. <a href="#enum-members">Enumerations</a> </div>
  53. <div class="headertitle">
  54. <div class="title">PacketPriority.h File Reference</div> </div>
  55. </div><!--header-->
  56. <div class="contents">
  57. <p>This file contains enumerations for packet priority and reliability enumerations.
  58. <a href="#details">More...</a></p>
  59. <table class="memberdecls">
  60. <tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="enum-members"></a>
  61. Enumerations</h2></td></tr>
  62. <tr class="memitem:a659378374e516180f93640c79f59705c"><td class="memItemLeft" align="right" valign="top">enum &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="PacketPriority_8h.html#a659378374e516180f93640c79f59705c">PacketPriority</a> { <a class="el" href="PacketPriority_8h.html#a659378374e516180f93640c79f59705ca416b3a41b78a58a7a5a6ee24d628e456">IMMEDIATE_PRIORITY</a>,
  63. <a class="el" href="PacketPriority_8h.html#a659378374e516180f93640c79f59705cacb1785f11dd02aa7f5d164fb314c594e">HIGH_PRIORITY</a>,
  64. <a class="el" href="PacketPriority_8h.html#a659378374e516180f93640c79f59705ca06b314d863076d54942e065d90c179c4">MEDIUM_PRIORITY</a>,
  65. <a class="el" href="PacketPriority_8h.html#a659378374e516180f93640c79f59705cadb8ee22a232a2787f32ba28da55c43c1">LOW_PRIORITY</a>
  66. }</td></tr>
  67. <tr class="memdesc:a659378374e516180f93640c79f59705c"><td class="mdescLeft">&#160;</td><td class="mdescRight">These enumerations are used to describe when packets are delivered. <a href="PacketPriority_8h.html#a659378374e516180f93640c79f59705c">More...</a><br/></td></tr>
  68. <tr class="separator:a659378374e516180f93640c79f59705c"><td class="memSeparator" colspan="2">&#160;</td></tr>
  69. <tr class="memitem:ae41fa01235e99dced384d137fa874a7e"><td class="memItemLeft" align="right" valign="top">enum &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="PacketPriority_8h.html#ae41fa01235e99dced384d137fa874a7e">PacketReliability</a> { <br/>
  70. &#160;&#160;<a class="el" href="PacketPriority_8h.html#ae41fa01235e99dced384d137fa874a7eaeb409c363ddaeb3201fd95e9bee56696">UNRELIABLE</a>,
  71. <a class="el" href="PacketPriority_8h.html#ae41fa01235e99dced384d137fa874a7eab6a8eb609ec1adbd5af421cf2acbedf5">UNRELIABLE_SEQUENCED</a>,
  72. <a class="el" href="PacketPriority_8h.html#ae41fa01235e99dced384d137fa874a7eabc6ba98e9404532481e43eea39731929">RELIABLE</a>,
  73. <a class="el" href="PacketPriority_8h.html#ae41fa01235e99dced384d137fa874a7eaff2d39b163bcf3e142744962bfb0849f">RELIABLE_ORDERED</a>,
  74. <br/>
  75. &#160;&#160;<a class="el" href="PacketPriority_8h.html#ae41fa01235e99dced384d137fa874a7eae1fc3633b353730ff448e5b6675f7085">RELIABLE_SEQUENCED</a>,
  76. <a class="el" href="PacketPriority_8h.html#ae41fa01235e99dced384d137fa874a7ea4a623962051043733acde3e595e1cce0">UNRELIABLE_WITH_ACK_RECEIPT</a>,
  77. <a class="el" href="PacketPriority_8h.html#ae41fa01235e99dced384d137fa874a7eacd15d4c4a2cea8b4c4459f1d3c09d95f">RELIABLE_WITH_ACK_RECEIPT</a>,
  78. <a class="el" href="PacketPriority_8h.html#ae41fa01235e99dced384d137fa874a7eae94727e3abc9217e16c1c19f1e8f850a">RELIABLE_ORDERED_WITH_ACK_RECEIPT</a>,
  79. <br/>
  80. &#160;&#160;<a class="el" href="PacketPriority_8h.html#ae41fa01235e99dced384d137fa874a7eaf49e4584ca35290efd854922f4cad6be">NUMBER_OF_RELIABILITIES</a>
  81. <br/>
  82. }</td></tr>
  83. <tr class="separator:ae41fa01235e99dced384d137fa874a7e"><td class="memSeparator" colspan="2">&#160;</td></tr>
  84. </table>
  85. <a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
  86. <div class="textblock"><p>This file contains enumerations for packet priority and reliability enumerations. </p>
  87. <p>This file is part of <a class="el" href="namespaceRakNet.html" title="Simple class to send changes between directories. In essence, a simple autopatcher that can be used f...">RakNet</a> Copyright (c) 2014, Oculus VR, Inc.</p>
  88. <p>Usage of <a class="el" href="namespaceRakNet.html" title="Simple class to send changes between directories. In essence, a simple autopatcher that can be used f...">RakNet</a> is subject to the appropriate license agreement. </p>
  89. </div><h2 class="groupheader">Enumeration Type Documentation</h2>
  90. <a class="anchor" id="a659378374e516180f93640c79f59705c"></a>
  91. <div class="memitem">
  92. <div class="memproto">
  93. <table class="memname">
  94. <tr>
  95. <td class="memname">enum <a class="el" href="PacketPriority_8h.html#a659378374e516180f93640c79f59705c">PacketPriority</a></td>
  96. </tr>
  97. </table>
  98. </div><div class="memdoc">
  99. <p>These enumerations are used to describe when packets are delivered. </p>
  100. <dl><dt><b>Enumerator: </b></dt><dd><table border="0" cellspacing="2" cellpadding="0">
  101. <tr><td valign="top"><em><a class="anchor" id="a659378374e516180f93640c79f59705ca416b3a41b78a58a7a5a6ee24d628e456"></a>IMMEDIATE_PRIORITY</em>&nbsp;</td><td>
  102. <p>The highest possible priority. These message trigger sends immediately, and are generally not buffered or aggregated into a single datagram. </p>
  103. </td></tr>
  104. <tr><td valign="top"><em><a class="anchor" id="a659378374e516180f93640c79f59705cacb1785f11dd02aa7f5d164fb314c594e"></a>HIGH_PRIORITY</em>&nbsp;</td><td>
  105. <p>For every 2 IMMEDIATE_PRIORITY messages, 1 HIGH_PRIORITY will be sent. Messages at this priority and lower are buffered to be sent in groups at 10 millisecond intervals to reduce UDP overhead and better measure congestion control. </p>
  106. </td></tr>
  107. <tr><td valign="top"><em><a class="anchor" id="a659378374e516180f93640c79f59705ca06b314d863076d54942e065d90c179c4"></a>MEDIUM_PRIORITY</em>&nbsp;</td><td>
  108. <p>For every 2 HIGH_PRIORITY messages, 1 MEDIUM_PRIORITY will be sent. Messages at this priority and lower are buffered to be sent in groups at 10 millisecond intervals to reduce UDP overhead and better measure congestion control. </p>
  109. </td></tr>
  110. <tr><td valign="top"><em><a class="anchor" id="a659378374e516180f93640c79f59705cadb8ee22a232a2787f32ba28da55c43c1"></a>LOW_PRIORITY</em>&nbsp;</td><td>
  111. <p>For every 2 MEDIUM_PRIORITY messages, 1 LOW_PRIORITY will be sent. Messages at this priority and lower are buffered to be sent in groups at 10 millisecond intervals to reduce UDP overhead and better measure congestion control. </p>
  112. </td></tr>
  113. </table>
  114. </dd>
  115. </dl>
  116. </div>
  117. </div>
  118. <a class="anchor" id="ae41fa01235e99dced384d137fa874a7e"></a>
  119. <div class="memitem">
  120. <div class="memproto">
  121. <table class="memname">
  122. <tr>
  123. <td class="memname">enum <a class="el" href="PacketPriority_8h.html#ae41fa01235e99dced384d137fa874a7e">PacketReliability</a></td>
  124. </tr>
  125. </table>
  126. </div><div class="memdoc">
  127. <p>These enumerations are used to describe how packets are delivered. </p>
  128. <dl class="section note"><dt>Note</dt><dd>Note to self: I write this with 3 bits in the stream. If I add more remember to change that </dd>
  129. <dd>
  130. In ReliabilityLayer::WriteToBitStreamFromInternalPacket I assume there are 5 major types </dd>
  131. <dd>
  132. Do not reorder, I check on &gt;= UNRELIABLE_WITH_ACK_RECEIPT </dd></dl>
  133. <dl><dt><b>Enumerator: </b></dt><dd><table border="0" cellspacing="2" cellpadding="0">
  134. <tr><td valign="top"><em><a class="anchor" id="ae41fa01235e99dced384d137fa874a7eaeb409c363ddaeb3201fd95e9bee56696"></a>UNRELIABLE</em>&nbsp;</td><td>
  135. <p>Same as regular UDP, except that it will also discard duplicate datagrams. <a class="el" href="namespaceRakNet.html" title="Simple class to send changes between directories. In essence, a simple autopatcher that can be used f...">RakNet</a> adds (6 to 17) + 21 bits of overhead, 16 of which is used to detect duplicate packets and 6 to 17 of which is used for message length. </p>
  136. </td></tr>
  137. <tr><td valign="top"><em><a class="anchor" id="ae41fa01235e99dced384d137fa874a7eab6a8eb609ec1adbd5af421cf2acbedf5"></a>UNRELIABLE_SEQUENCED</em>&nbsp;</td><td>
  138. <p>Regular UDP with a sequence counter. Out of order messages will be discarded. Sequenced and ordered messages sent on the same channel will arrive in the order sent. </p>
  139. </td></tr>
  140. <tr><td valign="top"><em><a class="anchor" id="ae41fa01235e99dced384d137fa874a7eabc6ba98e9404532481e43eea39731929"></a>RELIABLE</em>&nbsp;</td><td>
  141. <p>The message is sent reliably, but not necessarily in any order. Same overhead as UNRELIABLE. </p>
  142. </td></tr>
  143. <tr><td valign="top"><em><a class="anchor" id="ae41fa01235e99dced384d137fa874a7eaff2d39b163bcf3e142744962bfb0849f"></a>RELIABLE_ORDERED</em>&nbsp;</td><td>
  144. <p>This message is reliable and will arrive in the order you sent it. Messages will be delayed while waiting for out of order messages. Same overhead as UNRELIABLE_SEQUENCED. Sequenced and ordered messages sent on the same channel will arrive in the order sent. </p>
  145. </td></tr>
  146. <tr><td valign="top"><em><a class="anchor" id="ae41fa01235e99dced384d137fa874a7eae1fc3633b353730ff448e5b6675f7085"></a>RELIABLE_SEQUENCED</em>&nbsp;</td><td>
  147. <p>This message is reliable and will arrive in the sequence you sent it. Out or order messages will be dropped. Same overhead as UNRELIABLE_SEQUENCED. Sequenced and ordered messages sent on the same channel will arrive in the order sent. </p>
  148. </td></tr>
  149. <tr><td valign="top"><em><a class="anchor" id="ae41fa01235e99dced384d137fa874a7ea4a623962051043733acde3e595e1cce0"></a>UNRELIABLE_WITH_ACK_RECEIPT</em>&nbsp;</td><td>
  150. <p>Same as UNRELIABLE, however the user will get either ID_SND_RECEIPT_ACKED or ID_SND_RECEIPT_LOSS based on the result of sending this message when calling RakPeerInterface::Receive(). Bytes 1-4 will contain the number returned from the Send() function. On disconnect or shutdown, all messages not previously acked should be considered lost. </p>
  151. </td></tr>
  152. <tr><td valign="top"><em><a class="anchor" id="ae41fa01235e99dced384d137fa874a7eacd15d4c4a2cea8b4c4459f1d3c09d95f"></a>RELIABLE_WITH_ACK_RECEIPT</em>&nbsp;</td><td>
  153. <p>Same as RELIABLE. The user will also get ID_SND_RECEIPT_ACKED after the message is delivered when calling RakPeerInterface::Receive(). ID_SND_RECEIPT_ACKED is returned when the message arrives, not necessarily the order when it was sent. Bytes 1-4 will contain the number returned from the Send() function. On disconnect or shutdown, all messages not previously acked should be considered lost. This does not return ID_SND_RECEIPT_LOSS. </p>
  154. <p>Same as UNRELIABLE_SEQUENCED, however the user will get either ID_SND_RECEIPT_ACKED or ID_SND_RECEIPT_LOSS based on the result of sending this message when calling RakPeerInterface::Receive(). Bytes 1-4 will contain the number returned from the Send() function. On disconnect or shutdown, all messages not previously acked should be considered lost. 05/04/10 You can't have sequenced and ack receipts, because you don't know if the other system discarded the message, meaning you don't know if the message was processed </p>
  155. </td></tr>
  156. <tr><td valign="top"><em><a class="anchor" id="ae41fa01235e99dced384d137fa874a7eae94727e3abc9217e16c1c19f1e8f850a"></a>RELIABLE_ORDERED_WITH_ACK_RECEIPT</em>&nbsp;</td><td>
  157. <p>Same as RELIABLE_ORDERED_ACK_RECEIPT. The user will also get ID_SND_RECEIPT_ACKED after the message is delivered when calling RakPeerInterface::Receive(). ID_SND_RECEIPT_ACKED is returned when the message arrives, not necessarily the order when it was sent. Bytes 1-4 will contain the number returned from the Send() function. On disconnect or shutdown, all messages not previously acked should be considered lost. This does not return ID_SND_RECEIPT_LOSS. </p>
  158. </td></tr>
  159. <tr><td valign="top"><em><a class="anchor" id="ae41fa01235e99dced384d137fa874a7eaf49e4584ca35290efd854922f4cad6be"></a>NUMBER_OF_RELIABILITIES</em>&nbsp;</td><td>
  160. <p>Same as RELIABLE_SEQUENCED. The user will also get ID_SND_RECEIPT_ACKED after the message is delivered when calling RakPeerInterface::Receive(). Bytes 1-4 will contain the number returned from the Send() function. On disconnect or shutdown, all messages not previously acked should be considered lost. 05/04/10 You can't have sequenced and ack receipts, because you don't know if the other system discarded the message, meaning you don't know if the message was processed </p>
  161. </td></tr>
  162. </table>
  163. </dd>
  164. </dl>
  165. </div>
  166. </div>
  167. </div><!-- contents -->
  168. <!-- start footer part -->
  169. <hr class="footer"/><address class="footer"><small>
  170. Generated on Mon Jun 2 2014 20:10:28 for RakNet by &#160;<a href="http://www.doxygen.org/index.html">
  171. <img class="footer" src="doxygen.png" alt="doxygen"/>
  172. </a> 1.8.2
  173. </small></address>
  174. </body>
  175. </html>
粤ICP备19079148号