classRakNet_1_1NatPunchthroughClient.html 29 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385
  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: RakNet::NatPunchthroughClient Class 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 class="current"><a href="annotated.html"><span>Classes</span></a></li>
  36. <li><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="annotated.html"><span>Class&#160;List</span></a></li>
  42. <li><a href="classes.html"><span>Class&#160;Index</span></a></li>
  43. <li><a href="hierarchy.html"><span>Class&#160;Hierarchy</span></a></li>
  44. <li><a href="functions.html"><span>Class&#160;Members</span></a></li>
  45. </ul>
  46. </div>
  47. <div id="nav-path" class="navpath">
  48. <ul>
  49. <li class="navelem"><a class="el" href="namespaceRakNet.html">RakNet</a></li><li class="navelem"><a class="el" href="classRakNet_1_1NatPunchthroughClient.html">NatPunchthroughClient</a></li> </ul>
  50. </div>
  51. </div><!-- top -->
  52. <div class="header">
  53. <div class="summary">
  54. <a href="#pub-methods">Public Member Functions</a> &#124;
  55. <a href="classRakNet_1_1NatPunchthroughClient-members.html">List of all members</a> </div>
  56. <div class="headertitle">
  57. <div class="title">RakNet::NatPunchthroughClient Class Reference<div class="ingroups"><a class="el" href="group__NAT__PUNCHTHROUGH__GROUP.html">NatPunchthrough</a></div></div> </div>
  58. </div><!--header-->
  59. <div class="contents">
  60. <p>Client code for NATPunchthrough.
  61. <a href="classRakNet_1_1NatPunchthroughClient.html#details">More...</a></p>
  62. <p><code>#include &lt;NatPunchthroughClient.h&gt;</code></p>
  63. <div class="dynheader">
  64. Inheritance diagram for RakNet::NatPunchthroughClient:</div>
  65. <div class="dyncontent">
  66. <div class="center">
  67. <img src="classRakNet_1_1NatPunchthroughClient.png" usemap="#RakNet::NatPunchthroughClient_map" alt=""/>
  68. <map id="RakNet::NatPunchthroughClient_map" name="RakNet::NatPunchthroughClient_map">
  69. <area href="classRakNet_1_1PluginInterface2.html" alt="RakNet::PluginInterface2" shape="rect" coords="0,0,188,24"/>
  70. </map>
  71. </div></div>
  72. <table class="memberdecls">
  73. <tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-methods"></a>
  74. Public Member Functions</h2></td></tr>
  75. <tr class="memitem:ab830402dee86fc7b557e098f4ccdd4f1"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classRakNet_1_1NatPunchthroughClient.html#ab830402dee86fc7b557e098f4ccdd4f1">FindRouterPortStride</a> (const <a class="el" href="structRakNet_1_1SystemAddress.html">SystemAddress</a> &amp;facilitator)</td></tr>
  76. <tr class="separator:ab830402dee86fc7b557e098f4ccdd4f1"><td class="memSeparator" colspan="2">&#160;</td></tr>
  77. <tr class="memitem:a92dbda7c976d5973c5cd6a3e0aea95c0"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classRakNet_1_1NatPunchthroughClient.html#a92dbda7c976d5973c5cd6a3e0aea95c0">OpenNAT</a> (<a class="el" href="structRakNet_1_1RakNetGUID.html">RakNetGUID</a> destination, const <a class="el" href="structRakNet_1_1SystemAddress.html">SystemAddress</a> &amp;facilitator)</td></tr>
  78. <tr class="separator:a92dbda7c976d5973c5cd6a3e0aea95c0"><td class="memSeparator" colspan="2">&#160;</td></tr>
  79. <tr class="memitem:a6131cc61e5af13399db4358fbb7b0d15"><td class="memItemLeft" align="right" valign="top">PunchthroughConfiguration *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classRakNet_1_1NatPunchthroughClient.html#a6131cc61e5af13399db4358fbb7b0d15">GetPunchthroughConfiguration</a> (void)</td></tr>
  80. <tr class="separator:a6131cc61e5af13399db4358fbb7b0d15"><td class="memSeparator" colspan="2">&#160;</td></tr>
  81. <tr class="memitem:a7bc339aacd4c7f355ebfbab17059c4a0"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classRakNet_1_1NatPunchthroughClient.html#a7bc339aacd4c7f355ebfbab17059c4a0">SetDebugInterface</a> (NatPunchthroughDebugInterface *i)</td></tr>
  82. <tr class="separator:a7bc339aacd4c7f355ebfbab17059c4a0"><td class="memSeparator" colspan="2">&#160;</td></tr>
  83. <tr class="memitem:a621163bc6be3e7d6f6c6b4d9c8e5f938"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a621163bc6be3e7d6f6c6b4d9c8e5f938"></a>
  84. void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classRakNet_1_1NatPunchthroughClient.html#a621163bc6be3e7d6f6c6b4d9c8e5f938">GetUPNPPortMappings</a> (char *externalPort, char *internalPort, const <a class="el" href="structRakNet_1_1SystemAddress.html">SystemAddress</a> &amp;natPunchthroughServerAddress)</td></tr>
  85. <tr class="memdesc:a621163bc6be3e7d6f6c6b4d9c8e5f938"><td class="mdescLeft">&#160;</td><td class="mdescRight">Get the port mappings you should pass to UPNP (for miniupnpc-1.6.20120410, for the function UPNP_AddPortMapping) <br/></td></tr>
  86. <tr class="separator:a621163bc6be3e7d6f6c6b4d9c8e5f938"><td class="memSeparator" colspan="2">&#160;</td></tr>
  87. <tr class="memitem:afdb000c77864073b54260e4e882a3010"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="afdb000c77864073b54260e4e882a3010"></a>
  88. virtual void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classRakNet_1_1NatPunchthroughClient.html#afdb000c77864073b54260e4e882a3010">Update</a> (void)</td></tr>
  89. <tr class="memdesc:afdb000c77864073b54260e4e882a3010"><td class="mdescLeft">&#160;</td><td class="mdescRight">Update is called every time a packet is checked for . <br/></td></tr>
  90. <tr class="separator:afdb000c77864073b54260e4e882a3010"><td class="memSeparator" colspan="2">&#160;</td></tr>
  91. <tr class="memitem:a417a0812408c178e1e95d8983389e286"><td class="memItemLeft" align="right" valign="top">virtual <a class="el" href="group__PLUGIN__INTERFACE__GROUP.html#ga89998adaafb29e5d879113b992161085">PluginReceiveResult</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classRakNet_1_1NatPunchthroughClient.html#a417a0812408c178e1e95d8983389e286">OnReceive</a> (<a class="el" href="structRakNet_1_1Packet.html">Packet</a> *packet)</td></tr>
  92. <tr class="separator:a417a0812408c178e1e95d8983389e286"><td class="memSeparator" colspan="2">&#160;</td></tr>
  93. <tr class="memitem:a9819ed681b72317c2c97fc1f2abfc947"><td class="memItemLeft" align="right" valign="top">virtual void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classRakNet_1_1NatPunchthroughClient.html#a9819ed681b72317c2c97fc1f2abfc947">OnNewConnection</a> (const <a class="el" href="structRakNet_1_1SystemAddress.html">SystemAddress</a> &amp;systemAddress, <a class="el" href="structRakNet_1_1RakNetGUID.html">RakNetGUID</a> rakNetGUID, bool isIncoming)</td></tr>
  94. <tr class="separator:a9819ed681b72317c2c97fc1f2abfc947"><td class="memSeparator" colspan="2">&#160;</td></tr>
  95. <tr class="memitem:a67db8e781fea747763df43240a29a84f"><td class="memItemLeft" align="right" valign="top">virtual void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classRakNet_1_1NatPunchthroughClient.html#a67db8e781fea747763df43240a29a84f">OnClosedConnection</a> (const <a class="el" href="structRakNet_1_1SystemAddress.html">SystemAddress</a> &amp;systemAddress, <a class="el" href="structRakNet_1_1RakNetGUID.html">RakNetGUID</a> rakNetGUID, <a class="el" href="group__PLUGIN__INTERFACE__GROUP.html#ga376cc546fd6892c2ead48cd51796c8b8">PI2_LostConnectionReason</a> lostConnectionReason)</td></tr>
  96. <tr class="separator:a67db8e781fea747763df43240a29a84f"><td class="memSeparator" colspan="2">&#160;</td></tr>
  97. <tr class="memitem:abec4863d26aa274f92e710245669d13b"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="abec4863d26aa274f92e710245669d13b"></a>
  98. virtual void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classRakNet_1_1NatPunchthroughClient.html#abec4863d26aa274f92e710245669d13b">OnAttach</a> (void)</td></tr>
  99. <tr class="memdesc:abec4863d26aa274f92e710245669d13b"><td class="mdescLeft">&#160;</td><td class="mdescRight">Called when the interface is attached. <br/></td></tr>
  100. <tr class="separator:abec4863d26aa274f92e710245669d13b"><td class="memSeparator" colspan="2">&#160;</td></tr>
  101. <tr class="memitem:a5f57399d9383c6bb3ff9a3ce64326572"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a5f57399d9383c6bb3ff9a3ce64326572"></a>
  102. virtual void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classRakNet_1_1NatPunchthroughClient.html#a5f57399d9383c6bb3ff9a3ce64326572">OnDetach</a> (void)</td></tr>
  103. <tr class="memdesc:a5f57399d9383c6bb3ff9a3ce64326572"><td class="mdescLeft">&#160;</td><td class="mdescRight">Called when the interface is detached. <br/></td></tr>
  104. <tr class="separator:a5f57399d9383c6bb3ff9a3ce64326572"><td class="memSeparator" colspan="2">&#160;</td></tr>
  105. <tr class="memitem:a1563e46fb5626c93da63a39e549f9147"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a1563e46fb5626c93da63a39e549f9147"></a>
  106. virtual void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classRakNet_1_1NatPunchthroughClient.html#a1563e46fb5626c93da63a39e549f9147">OnRakPeerShutdown</a> (void)</td></tr>
  107. <tr class="memdesc:a1563e46fb5626c93da63a39e549f9147"><td class="mdescLeft">&#160;</td><td class="mdescRight">Called when <a class="el" href="classRakNet_1_1RakPeer.html" title="Main interface for network communications.">RakPeer</a> is shutdown. <br/></td></tr>
  108. <tr class="separator:a1563e46fb5626c93da63a39e549f9147"><td class="memSeparator" colspan="2">&#160;</td></tr>
  109. <tr class="inherit_header pub_methods_classRakNet_1_1PluginInterface2"><td colspan="2" onclick="javascript:toggleInherit('pub_methods_classRakNet_1_1PluginInterface2')"><img src="closed.png" alt="-"/>&#160;Public Member Functions inherited from <a class="el" href="classRakNet_1_1PluginInterface2.html">RakNet::PluginInterface2</a></td></tr>
  110. <tr class="memitem:a14825e69f0560996327e4dd351842c06 inherit pub_methods_classRakNet_1_1PluginInterface2"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a14825e69f0560996327e4dd351842c06"></a>
  111. virtual void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classRakNet_1_1PluginInterface2.html#a14825e69f0560996327e4dd351842c06">OnRakPeerStartup</a> (void)</td></tr>
  112. <tr class="memdesc:a14825e69f0560996327e4dd351842c06 inherit pub_methods_classRakNet_1_1PluginInterface2"><td class="mdescLeft">&#160;</td><td class="mdescRight">Called when <a class="el" href="classRakNet_1_1RakPeer.html" title="Main interface for network communications.">RakPeer</a> is initialized. <br/></td></tr>
  113. <tr class="separator:a14825e69f0560996327e4dd351842c06 inherit pub_methods_classRakNet_1_1PluginInterface2"><td class="memSeparator" colspan="2">&#160;</td></tr>
  114. <tr class="memitem:a9504489498df14b6efa5ca9bd39aede4 inherit pub_methods_classRakNet_1_1PluginInterface2"><td class="memItemLeft" align="right" valign="top">virtual void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classRakNet_1_1PluginInterface2.html#a9504489498df14b6efa5ca9bd39aede4">OnFailedConnectionAttempt</a> (<a class="el" href="structRakNet_1_1Packet.html">Packet</a> *packet, <a class="el" href="group__PLUGIN__INTERFACE__GROUP.html#ga3e92f686bace869b78c10508c58e0825">PI2_FailedConnectionAttemptReason</a> failedConnectionAttemptReason)</td></tr>
  115. <tr class="separator:a9504489498df14b6efa5ca9bd39aede4 inherit pub_methods_classRakNet_1_1PluginInterface2"><td class="memSeparator" colspan="2">&#160;</td></tr>
  116. <tr class="memitem:accfca7d25262c48a87a30114383284aa inherit pub_methods_classRakNet_1_1PluginInterface2"><td class="memItemLeft" align="right" valign="top">virtual bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classRakNet_1_1PluginInterface2.html#accfca7d25262c48a87a30114383284aa">UsesReliabilityLayer</a> (void) const </td></tr>
  117. <tr class="separator:accfca7d25262c48a87a30114383284aa inherit pub_methods_classRakNet_1_1PluginInterface2"><td class="memSeparator" colspan="2">&#160;</td></tr>
  118. <tr class="memitem:a7a6f69c6fc3a121e3676298a63a9ef78 inherit pub_methods_classRakNet_1_1PluginInterface2"><td class="memItemLeft" align="right" valign="top">virtual void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classRakNet_1_1PluginInterface2.html#a7a6f69c6fc3a121e3676298a63a9ef78">OnDirectSocketSend</a> (const char *data, const BitSize_t bitsUsed, <a class="el" href="structRakNet_1_1SystemAddress.html">SystemAddress</a> remoteSystemAddress)</td></tr>
  119. <tr class="separator:a7a6f69c6fc3a121e3676298a63a9ef78 inherit pub_methods_classRakNet_1_1PluginInterface2"><td class="memSeparator" colspan="2">&#160;</td></tr>
  120. <tr class="memitem:a9aac1101ad58e8443516588e96e066ec inherit pub_methods_classRakNet_1_1PluginInterface2"><td class="memItemLeft" align="right" valign="top">virtual void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classRakNet_1_1PluginInterface2.html#a9aac1101ad58e8443516588e96e066ec">OnDirectSocketReceive</a> (const char *data, const BitSize_t bitsUsed, <a class="el" href="structRakNet_1_1SystemAddress.html">SystemAddress</a> remoteSystemAddress)</td></tr>
  121. <tr class="separator:a9aac1101ad58e8443516588e96e066ec inherit pub_methods_classRakNet_1_1PluginInterface2"><td class="memSeparator" colspan="2">&#160;</td></tr>
  122. <tr class="memitem:abf51e60546bd74d21c91dc0d6f9f3a4b inherit pub_methods_classRakNet_1_1PluginInterface2"><td class="memItemLeft" align="right" valign="top">virtual void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classRakNet_1_1PluginInterface2.html#abf51e60546bd74d21c91dc0d6f9f3a4b">OnReliabilityLayerNotification</a> (const char *errorMessage, const BitSize_t bitsUsed, <a class="el" href="structRakNet_1_1SystemAddress.html">SystemAddress</a> remoteSystemAddress, bool isError)</td></tr>
  123. <tr class="separator:abf51e60546bd74d21c91dc0d6f9f3a4b inherit pub_methods_classRakNet_1_1PluginInterface2"><td class="memSeparator" colspan="2">&#160;</td></tr>
  124. <tr class="memitem:a399b8c93daa0236599961e754742e2f7 inherit pub_methods_classRakNet_1_1PluginInterface2"><td class="memItemLeft" align="right" valign="top">virtual void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classRakNet_1_1PluginInterface2.html#a399b8c93daa0236599961e754742e2f7">OnInternalPacket</a> (<a class="el" href="structRakNet_1_1InternalPacket.html">InternalPacket</a> *internalPacket, unsigned frameNumber, <a class="el" href="structRakNet_1_1SystemAddress.html">SystemAddress</a> remoteSystemAddress, RakNet::TimeMS time, int isSend)</td></tr>
  125. <tr class="separator:a399b8c93daa0236599961e754742e2f7 inherit pub_methods_classRakNet_1_1PluginInterface2"><td class="memSeparator" colspan="2">&#160;</td></tr>
  126. <tr class="memitem:ae0b0cad31cfc209c48197c77d6b46345 inherit pub_methods_classRakNet_1_1PluginInterface2"><td class="memItemLeft" align="right" valign="top">virtual void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classRakNet_1_1PluginInterface2.html#ae0b0cad31cfc209c48197c77d6b46345">OnAck</a> (unsigned int messageNumber, <a class="el" href="structRakNet_1_1SystemAddress.html">SystemAddress</a> remoteSystemAddress, RakNet::TimeMS time)</td></tr>
  127. <tr class="separator:ae0b0cad31cfc209c48197c77d6b46345 inherit pub_methods_classRakNet_1_1PluginInterface2"><td class="memSeparator" colspan="2">&#160;</td></tr>
  128. <tr class="memitem:a5c976aea56ed85055a17c19d91b90727 inherit pub_methods_classRakNet_1_1PluginInterface2"><td class="memItemLeft" align="right" valign="top">virtual void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classRakNet_1_1PluginInterface2.html#a5c976aea56ed85055a17c19d91b90727">OnPushBackPacket</a> (const char *data, const BitSize_t bitsUsed, <a class="el" href="structRakNet_1_1SystemAddress.html">SystemAddress</a> remoteSystemAddress)</td></tr>
  129. <tr class="separator:a5c976aea56ed85055a17c19d91b90727 inherit pub_methods_classRakNet_1_1PluginInterface2"><td class="memSeparator" colspan="2">&#160;</td></tr>
  130. </table>
  131. <a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
  132. <div class="textblock"><p>Client code for NATPunchthrough. </p>
  133. <p>Maintain connection to <a class="el" href="classRakNet_1_1NatPunchthroughServer.html" title="Server code for NATPunchthrough.">NatPunchthroughServer</a> to process incoming connection attempts through <a class="el" href="classRakNet_1_1NatPunchthroughClient.html" title="Client code for NATPunchthrough.">NatPunchthroughClient</a><br/>
  134. Client will send datagrams to port to estimate next port<br/>
  135. Will simultaneously connect with another client once ports are estimated. </p>
  136. <dl class="section see"><dt>See Also</dt><dd><a class="el" href="classRakNet_1_1NatTypeDetectionClient.html" title="Client code for NatTypeDetection.">NatTypeDetectionClient</a> See also <a href="http://www.jenkinssoftware.com/raknet/manual/natpunchthrough.html">http://www.jenkinssoftware.com/raknet/manual/natpunchthrough.html</a> </dd></dl>
  137. </div><h2 class="groupheader">Member Function Documentation</h2>
  138. <a class="anchor" id="ab830402dee86fc7b557e098f4ccdd4f1"></a>
  139. <div class="memitem">
  140. <div class="memproto">
  141. <table class="memname">
  142. <tr>
  143. <td class="memname">void RakNet::NatPunchthroughClient::FindRouterPortStride </td>
  144. <td>(</td>
  145. <td class="paramtype">const <a class="el" href="structRakNet_1_1SystemAddress.html">SystemAddress</a> &amp;&#160;</td>
  146. <td class="paramname"><em>facilitator</em></td><td>)</td>
  147. <td></td>
  148. </tr>
  149. </table>
  150. </div><div class="memdoc">
  151. <p>If the instance of <a class="el" href="classRakNet_1_1RakPeer.html" title="Main interface for network communications.">RakPeer</a> running NATPunchthroughServer was bound to two IP addresses, then you can call <a class="el" href="classRakNet_1_1NatPunchthroughClient.html#ab830402dee86fc7b557e098f4ccdd4f1">FindRouterPortStride()</a> This will determine the stride that your router uses when assigning ports, if your router is full-cone This function is also called automatically when you call OpenNAT - however, calling it earlier when you are connected to the facilitator will speed up the process </p>
  152. <dl class="params"><dt>Parameters</dt><dd>
  153. <table class="params">
  154. <tr><td class="paramdir">[in]</td><td class="paramname">destination</td><td>The system to punch. Must already be connected to <em>facilitator</em> </td></tr>
  155. </table>
  156. </dd>
  157. </dl>
  158. </div>
  159. </div>
  160. <a class="anchor" id="a6131cc61e5af13399db4358fbb7b0d15"></a>
  161. <div class="memitem">
  162. <div class="memproto">
  163. <table class="memname">
  164. <tr>
  165. <td class="memname">PunchthroughConfiguration* RakNet::NatPunchthroughClient::GetPunchthroughConfiguration </td>
  166. <td>(</td>
  167. <td class="paramtype">void&#160;</td>
  168. <td class="paramname"></td><td>)</td>
  169. <td></td>
  170. </tr>
  171. </table>
  172. </div><div class="memdoc">
  173. <p>Modify the system configuration if desired Don't modify the variables in the structure while punchthrough is in progress </p>
  174. </div>
  175. </div>
  176. <a class="anchor" id="a67db8e781fea747763df43240a29a84f"></a>
  177. <div class="memitem">
  178. <div class="memproto">
  179. <table class="mlabels">
  180. <tr>
  181. <td class="mlabels-left">
  182. <table class="memname">
  183. <tr>
  184. <td class="memname">virtual void RakNet::NatPunchthroughClient::OnClosedConnection </td>
  185. <td>(</td>
  186. <td class="paramtype">const <a class="el" href="structRakNet_1_1SystemAddress.html">SystemAddress</a> &amp;&#160;</td>
  187. <td class="paramname"><em>systemAddress</em>, </td>
  188. </tr>
  189. <tr>
  190. <td class="paramkey"></td>
  191. <td></td>
  192. <td class="paramtype"><a class="el" href="structRakNet_1_1RakNetGUID.html">RakNetGUID</a>&#160;</td>
  193. <td class="paramname"><em>rakNetGUID</em>, </td>
  194. </tr>
  195. <tr>
  196. <td class="paramkey"></td>
  197. <td></td>
  198. <td class="paramtype"><a class="el" href="group__PLUGIN__INTERFACE__GROUP.html#ga376cc546fd6892c2ead48cd51796c8b8">PI2_LostConnectionReason</a>&#160;</td>
  199. <td class="paramname"><em>lostConnectionReason</em>&#160;</td>
  200. </tr>
  201. <tr>
  202. <td></td>
  203. <td>)</td>
  204. <td></td><td></td>
  205. </tr>
  206. </table>
  207. </td>
  208. <td class="mlabels-right">
  209. <span class="mlabels"><span class="mlabel">virtual</span></span> </td>
  210. </tr>
  211. </table>
  212. </div><div class="memdoc">
  213. <p>Called when a connection is dropped because the user called <a class="el" href="classRakNet_1_1RakPeer.html#a95e3806fce8552e322236abcf105cbf9" title="Close the connection to another host (if we initiated the connection it will disconnect, if they did it will kick them out).">RakPeer::CloseConnection()</a> for a particular system </p>
  214. <dl class="params"><dt>Parameters</dt><dd>
  215. <table class="params">
  216. <tr><td class="paramdir">[in]</td><td class="paramname">systemAddress</td><td>The system whose connection was closed </td></tr>
  217. <tr><td class="paramdir">[in]</td><td class="paramname">rakNetGuid</td><td>The guid of the specified system </td></tr>
  218. <tr><td class="paramdir">[in]</td><td class="paramname">lostConnectionReason</td><td>How the connection was closed: manually, connection lost, or notification of disconnection </td></tr>
  219. </table>
  220. </dd>
  221. </dl>
  222. <p>Reimplemented from <a class="el" href="classRakNet_1_1PluginInterface2.html#a80c7612ca1a5dcfeec0b52d8049a71ea">RakNet::PluginInterface2</a>.</p>
  223. </div>
  224. </div>
  225. <a class="anchor" id="a9819ed681b72317c2c97fc1f2abfc947"></a>
  226. <div class="memitem">
  227. <div class="memproto">
  228. <table class="mlabels">
  229. <tr>
  230. <td class="mlabels-left">
  231. <table class="memname">
  232. <tr>
  233. <td class="memname">virtual void RakNet::NatPunchthroughClient::OnNewConnection </td>
  234. <td>(</td>
  235. <td class="paramtype">const <a class="el" href="structRakNet_1_1SystemAddress.html">SystemAddress</a> &amp;&#160;</td>
  236. <td class="paramname"><em>systemAddress</em>, </td>
  237. </tr>
  238. <tr>
  239. <td class="paramkey"></td>
  240. <td></td>
  241. <td class="paramtype"><a class="el" href="structRakNet_1_1RakNetGUID.html">RakNetGUID</a>&#160;</td>
  242. <td class="paramname"><em>rakNetGUID</em>, </td>
  243. </tr>
  244. <tr>
  245. <td class="paramkey"></td>
  246. <td></td>
  247. <td class="paramtype">bool&#160;</td>
  248. <td class="paramname"><em>isIncoming</em>&#160;</td>
  249. </tr>
  250. <tr>
  251. <td></td>
  252. <td>)</td>
  253. <td></td><td></td>
  254. </tr>
  255. </table>
  256. </td>
  257. <td class="mlabels-right">
  258. <span class="mlabels"><span class="mlabel">virtual</span></span> </td>
  259. </tr>
  260. </table>
  261. </div><div class="memdoc">
  262. <p>Called when we got a new connection </p>
  263. <dl class="params"><dt>Parameters</dt><dd>
  264. <table class="params">
  265. <tr><td class="paramdir">[in]</td><td class="paramname">systemAddress</td><td>Address of the new connection </td></tr>
  266. <tr><td class="paramdir">[in]</td><td class="paramname">rakNetGuid</td><td>The guid of the specified system </td></tr>
  267. <tr><td class="paramdir">[in]</td><td class="paramname">isIncoming</td><td>If true, this is ID_NEW_INCOMING_CONNECTION, or the equivalent </td></tr>
  268. </table>
  269. </dd>
  270. </dl>
  271. <p>Reimplemented from <a class="el" href="classRakNet_1_1PluginInterface2.html#abf13327cc10f772ba06dff8f2687f8ae">RakNet::PluginInterface2</a>.</p>
  272. </div>
  273. </div>
  274. <a class="anchor" id="a417a0812408c178e1e95d8983389e286"></a>
  275. <div class="memitem">
  276. <div class="memproto">
  277. <table class="mlabels">
  278. <tr>
  279. <td class="mlabels-left">
  280. <table class="memname">
  281. <tr>
  282. <td class="memname">virtual <a class="el" href="group__PLUGIN__INTERFACE__GROUP.html#ga89998adaafb29e5d879113b992161085">PluginReceiveResult</a> RakNet::NatPunchthroughClient::OnReceive </td>
  283. <td>(</td>
  284. <td class="paramtype"><a class="el" href="structRakNet_1_1Packet.html">Packet</a> *&#160;</td>
  285. <td class="paramname"><em>packet</em></td><td>)</td>
  286. <td></td>
  287. </tr>
  288. </table>
  289. </td>
  290. <td class="mlabels-right">
  291. <span class="mlabels"><span class="mlabel">virtual</span></span> </td>
  292. </tr>
  293. </table>
  294. </div><div class="memdoc">
  295. <p>OnReceive is called for every packet. </p>
  296. <dl class="params"><dt>Parameters</dt><dd>
  297. <table class="params">
  298. <tr><td class="paramdir">[in]</td><td class="paramname">packet</td><td>the packet that is being returned to the user </td></tr>
  299. </table>
  300. </dd>
  301. </dl>
  302. <dl class="section return"><dt>Returns</dt><dd>True to allow the game and other plugins to get this message, false to absorb it </dd></dl>
  303. <p>Reimplemented from <a class="el" href="classRakNet_1_1PluginInterface2.html#aa86f33263c1648f11b8a006469272639">RakNet::PluginInterface2</a>.</p>
  304. </div>
  305. </div>
  306. <a class="anchor" id="a92dbda7c976d5973c5cd6a3e0aea95c0"></a>
  307. <div class="memitem">
  308. <div class="memproto">
  309. <table class="memname">
  310. <tr>
  311. <td class="memname">bool RakNet::NatPunchthroughClient::OpenNAT </td>
  312. <td>(</td>
  313. <td class="paramtype"><a class="el" href="structRakNet_1_1RakNetGUID.html">RakNetGUID</a>&#160;</td>
  314. <td class="paramname"><em>destination</em>, </td>
  315. </tr>
  316. <tr>
  317. <td class="paramkey"></td>
  318. <td></td>
  319. <td class="paramtype">const <a class="el" href="structRakNet_1_1SystemAddress.html">SystemAddress</a> &amp;&#160;</td>
  320. <td class="paramname"><em>facilitator</em>&#160;</td>
  321. </tr>
  322. <tr>
  323. <td></td>
  324. <td>)</td>
  325. <td></td><td></td>
  326. </tr>
  327. </table>
  328. </div><div class="memdoc">
  329. <p>Punchthrough a NAT. Doesn't connect, just tries to setup the routing table </p>
  330. <dl class="params"><dt>Parameters</dt><dd>
  331. <table class="params">
  332. <tr><td class="paramdir">[in]</td><td class="paramname">destination</td><td>The system to punch. Must already be connected to <em>facilitator</em> </td></tr>
  333. <tr><td class="paramdir">[in]</td><td class="paramname">facilitator</td><td>A system we are already connected to running the <a class="el" href="classRakNet_1_1NatPunchthroughServer.html" title="Server code for NATPunchthrough.">NatPunchthroughServer</a> plugin </td></tr>
  334. </table>
  335. </dd>
  336. </dl>
  337. <dl class="section see"><dt>See Also</dt><dd>OpenNATGroup() You will get <a class="el" href="MessageIdentifiers_8h.html#ac1b471af280629f5ace02e586d5bcfd3affdbfc82c9c5d38c9c1f99d3244ed865">ID_NAT_PUNCHTHROUGH_SUCCEEDED</a> on success You will get <a class="el" href="MessageIdentifiers_8h.html#ac1b471af280629f5ace02e586d5bcfd3ab4a8fb1b8f1cf8d84c1ca12bce33554e" title="NATPunchthrough plugin: internal.">ID_NAT_TARGET_NOT_CONNECTED</a>, <a class="el" href="MessageIdentifiers_8h.html#ac1b471af280629f5ace02e586d5bcfd3afada41cc29bd7576f36f4adab1d0bc05">ID_NAT_TARGET_UNRESPONSIVE</a>, <a class="el" href="MessageIdentifiers_8h.html#ac1b471af280629f5ace02e586d5bcfd3a0a8781eb6bf0d36ced05ecba17c8d6ca">ID_NAT_CONNECTION_TO_TARGET_LOST</a>, <a class="el" href="MessageIdentifiers_8h.html#ac1b471af280629f5ace02e586d5bcfd3ac5d56d718ed0c497a00d57fae678fe54">ID_NAT_ALREADY_IN_PROGRESS</a>, or <a class="el" href="MessageIdentifiers_8h.html#ac1b471af280629f5ace02e586d5bcfd3abcd2f6fe83d1ab366fe70163bbb141d7">ID_NAT_PUNCHTHROUGH_FAILED</a> on failures of various types However, if you lose connection to the facilitator, you may not necessarily get above </dd></dl>
  338. </div>
  339. </div>
  340. <a class="anchor" id="a7bc339aacd4c7f355ebfbab17059c4a0"></a>
  341. <div class="memitem">
  342. <div class="memproto">
  343. <table class="memname">
  344. <tr>
  345. <td class="memname">void RakNet::NatPunchthroughClient::SetDebugInterface </td>
  346. <td>(</td>
  347. <td class="paramtype">NatPunchthroughDebugInterface *&#160;</td>
  348. <td class="paramname"><em>i</em></td><td>)</td>
  349. <td></td>
  350. </tr>
  351. </table>
  352. </div><div class="memdoc">
  353. <p>Sets a callback to be called with debug messages </p>
  354. <dl class="params"><dt>Parameters</dt><dd>
  355. <table class="params">
  356. <tr><td class="paramdir">[in]</td><td class="paramname">i</td><td>Pointer to an interface. The pointer is stored, so don't delete it while in progress. Pass 0 to clear. </td></tr>
  357. </table>
  358. </dd>
  359. </dl>
  360. </div>
  361. </div>
  362. <hr/>The documentation for this class was generated from the following file:<ul>
  363. <li>D:/temp/RakNet_PC/Source/<a class="el" href="NatPunchthroughClient_8h.html">NatPunchthroughClient.h</a></li>
  364. </ul>
  365. </div><!-- contents -->
  366. <!-- start footer part -->
  367. <hr class="footer"/><address class="footer"><small>
  368. Generated on Mon Jun 2 2014 20:10:28 for RakNet by &#160;<a href="http://www.doxygen.org/index.html">
  369. <img class="footer" src="doxygen.png" alt="doxygen"/>
  370. </a> 1.8.2
  371. </small></address>
  372. </body>
  373. </html>
粤ICP备19079148号