classRakNet_1_1TwoWayAuthentication.html 26 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305
  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::TwoWayAuthentication 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_1TwoWayAuthentication.html">TwoWayAuthentication</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_1TwoWayAuthentication-members.html">List of all members</a> </div>
  56. <div class="headertitle">
  57. <div class="title">RakNet::TwoWayAuthentication Class Reference<div class="ingroups"><a class="el" href="group__PLUGINS__GROUP.html">Plugins</a></div></div> </div>
  58. </div><!--header-->
  59. <div class="contents">
  60. <p>Implements two way authentication.
  61. <a href="classRakNet_1_1TwoWayAuthentication.html#details">More...</a></p>
  62. <p><code>#include &lt;TwoWayAuthentication.h&gt;</code></p>
  63. <div class="dynheader">
  64. Inheritance diagram for RakNet::TwoWayAuthentication:</div>
  65. <div class="dyncontent">
  66. <div class="center">
  67. <img src="classRakNet_1_1TwoWayAuthentication.png" usemap="#RakNet::TwoWayAuthentication_map" alt=""/>
  68. <map id="RakNet::TwoWayAuthentication_map" name="RakNet::TwoWayAuthentication_map">
  69. <area href="classRakNet_1_1PluginInterface2.html" alt="RakNet::PluginInterface2" shape="rect" coords="0,0,186,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:af3168d8bfabeb0fd17008e514a24736b"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classRakNet_1_1TwoWayAuthentication.html#af3168d8bfabeb0fd17008e514a24736b">AddPassword</a> (<a class="el" href="classRakNet_1_1RakString.html">RakNet::RakString</a> identifier, <a class="el" href="classRakNet_1_1RakString.html">RakNet::RakString</a> password)</td></tr>
  76. <tr class="memdesc:af3168d8bfabeb0fd17008e514a24736b"><td class="mdescLeft">&#160;</td><td class="mdescRight">Adds a password to the list of passwords the system will accept. <a href="#af3168d8bfabeb0fd17008e514a24736b"></a><br/></td></tr>
  77. <tr class="separator:af3168d8bfabeb0fd17008e514a24736b"><td class="memSeparator" colspan="2">&#160;</td></tr>
  78. <tr class="memitem:aa2e65f464fc887dc753a351e7e9fb797"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classRakNet_1_1TwoWayAuthentication.html#aa2e65f464fc887dc753a351e7e9fb797">Challenge</a> (<a class="el" href="classRakNet_1_1RakString.html">RakNet::RakString</a> identifier, AddressOrGUID remoteSystem)</td></tr>
  79. <tr class="memdesc:aa2e65f464fc887dc753a351e7e9fb797"><td class="mdescLeft">&#160;</td><td class="mdescRight">Challenge another system for the specified identifier. <a href="#aa2e65f464fc887dc753a351e7e9fb797"></a><br/></td></tr>
  80. <tr class="separator:aa2e65f464fc887dc753a351e7e9fb797"><td class="memSeparator" colspan="2">&#160;</td></tr>
  81. <tr class="memitem:ad66d0d154535ef461f3ba6be4ac3e14d"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ad66d0d154535ef461f3ba6be4ac3e14d"></a>
  82. void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classRakNet_1_1TwoWayAuthentication.html#ad66d0d154535ef461f3ba6be4ac3e14d">Clear</a> (void)</td></tr>
  83. <tr class="memdesc:ad66d0d154535ef461f3ba6be4ac3e14d"><td class="mdescLeft">&#160;</td><td class="mdescRight">Free all memory. <br/></td></tr>
  84. <tr class="separator:ad66d0d154535ef461f3ba6be4ac3e14d"><td class="memSeparator" colspan="2">&#160;</td></tr>
  85. <tr class="memitem:a09f52ebca8a86540a1270a76027e9503"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a09f52ebca8a86540a1270a76027e9503"></a>
  86. virtual void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classRakNet_1_1TwoWayAuthentication.html#a09f52ebca8a86540a1270a76027e9503">Update</a> (void)</td></tr>
  87. <tr class="memdesc:a09f52ebca8a86540a1270a76027e9503"><td class="mdescLeft">&#160;</td><td class="mdescRight">Update is called every time a packet is checked for . <br/></td></tr>
  88. <tr class="separator:a09f52ebca8a86540a1270a76027e9503"><td class="memSeparator" colspan="2">&#160;</td></tr>
  89. <tr class="memitem:a692b2d35df56e4a4c0550808d67864cc"><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_1TwoWayAuthentication.html#a692b2d35df56e4a4c0550808d67864cc">OnReceive</a> (<a class="el" href="structRakNet_1_1Packet.html">Packet</a> *packet)</td></tr>
  90. <tr class="separator:a692b2d35df56e4a4c0550808d67864cc"><td class="memSeparator" colspan="2">&#160;</td></tr>
  91. <tr class="memitem:a21174af5198820e661c3c8ea1bf5c599"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a21174af5198820e661c3c8ea1bf5c599"></a>
  92. virtual void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classRakNet_1_1TwoWayAuthentication.html#a21174af5198820e661c3c8ea1bf5c599">OnRakPeerShutdown</a> (void)</td></tr>
  93. <tr class="memdesc:a21174af5198820e661c3c8ea1bf5c599"><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>
  94. <tr class="separator:a21174af5198820e661c3c8ea1bf5c599"><td class="memSeparator" colspan="2">&#160;</td></tr>
  95. <tr class="memitem:ad683e107f9c25a5d833b55d547374c02"><td class="memItemLeft" align="right" valign="top">virtual void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classRakNet_1_1TwoWayAuthentication.html#ad683e107f9c25a5d833b55d547374c02">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:ad683e107f9c25a5d833b55d547374c02"><td class="memSeparator" colspan="2">&#160;</td></tr>
  97. <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>
  98. <tr class="memitem:a550529f3753c4acf22c3b5c3e203552c inherit pub_methods_classRakNet_1_1PluginInterface2"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a550529f3753c4acf22c3b5c3e203552c"></a>
  99. virtual void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classRakNet_1_1PluginInterface2.html#a550529f3753c4acf22c3b5c3e203552c">OnAttach</a> (void)</td></tr>
  100. <tr class="memdesc:a550529f3753c4acf22c3b5c3e203552c inherit pub_methods_classRakNet_1_1PluginInterface2"><td class="mdescLeft">&#160;</td><td class="mdescRight">Called when the interface is attached. <br/></td></tr>
  101. <tr class="separator:a550529f3753c4acf22c3b5c3e203552c inherit pub_methods_classRakNet_1_1PluginInterface2"><td class="memSeparator" colspan="2">&#160;</td></tr>
  102. <tr class="memitem:a73d686ffe9a04a74e5a0ce78422c60f2 inherit pub_methods_classRakNet_1_1PluginInterface2"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a73d686ffe9a04a74e5a0ce78422c60f2"></a>
  103. virtual void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classRakNet_1_1PluginInterface2.html#a73d686ffe9a04a74e5a0ce78422c60f2">OnDetach</a> (void)</td></tr>
  104. <tr class="memdesc:a73d686ffe9a04a74e5a0ce78422c60f2 inherit pub_methods_classRakNet_1_1PluginInterface2"><td class="mdescLeft">&#160;</td><td class="mdescRight">Called when the interface is detached. <br/></td></tr>
  105. <tr class="separator:a73d686ffe9a04a74e5a0ce78422c60f2 inherit pub_methods_classRakNet_1_1PluginInterface2"><td class="memSeparator" colspan="2">&#160;</td></tr>
  106. <tr class="memitem:a14825e69f0560996327e4dd351842c06 inherit pub_methods_classRakNet_1_1PluginInterface2"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a14825e69f0560996327e4dd351842c06"></a>
  107. virtual void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classRakNet_1_1PluginInterface2.html#a14825e69f0560996327e4dd351842c06">OnRakPeerStartup</a> (void)</td></tr>
  108. <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>
  109. <tr class="separator:a14825e69f0560996327e4dd351842c06 inherit pub_methods_classRakNet_1_1PluginInterface2"><td class="memSeparator" colspan="2">&#160;</td></tr>
  110. <tr class="memitem:abf13327cc10f772ba06dff8f2687f8ae 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#abf13327cc10f772ba06dff8f2687f8ae">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>
  111. <tr class="separator:abf13327cc10f772ba06dff8f2687f8ae inherit pub_methods_classRakNet_1_1PluginInterface2"><td class="memSeparator" colspan="2">&#160;</td></tr>
  112. <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>
  113. <tr class="separator:a9504489498df14b6efa5ca9bd39aede4 inherit pub_methods_classRakNet_1_1PluginInterface2"><td class="memSeparator" colspan="2">&#160;</td></tr>
  114. <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>
  115. <tr class="separator:accfca7d25262c48a87a30114383284aa inherit pub_methods_classRakNet_1_1PluginInterface2"><td class="memSeparator" colspan="2">&#160;</td></tr>
  116. <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>
  117. <tr class="separator:a7a6f69c6fc3a121e3676298a63a9ef78 inherit pub_methods_classRakNet_1_1PluginInterface2"><td class="memSeparator" colspan="2">&#160;</td></tr>
  118. <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>
  119. <tr class="separator:a9aac1101ad58e8443516588e96e066ec inherit pub_methods_classRakNet_1_1PluginInterface2"><td class="memSeparator" colspan="2">&#160;</td></tr>
  120. <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>
  121. <tr class="separator:abf51e60546bd74d21c91dc0d6f9f3a4b inherit pub_methods_classRakNet_1_1PluginInterface2"><td class="memSeparator" colspan="2">&#160;</td></tr>
  122. <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>
  123. <tr class="separator:a399b8c93daa0236599961e754742e2f7 inherit pub_methods_classRakNet_1_1PluginInterface2"><td class="memSeparator" colspan="2">&#160;</td></tr>
  124. <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>
  125. <tr class="separator:ae0b0cad31cfc209c48197c77d6b46345 inherit pub_methods_classRakNet_1_1PluginInterface2"><td class="memSeparator" colspan="2">&#160;</td></tr>
  126. <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>
  127. <tr class="separator:a5c976aea56ed85055a17c19d91b90727 inherit pub_methods_classRakNet_1_1PluginInterface2"><td class="memSeparator" colspan="2">&#160;</td></tr>
  128. </table>
  129. <a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
  130. <div class="textblock"><p>Implements two way authentication. </p>
  131. <p>Given two systems, each of whom known a common password / identifier pair, verify the password without transmitting it This can be used to determine what permissions are should be allowed to the other system If the other system should not send any data until authentication passes, you can use the <a class="el" href="classRakNet_1_1MessageFilter.html" title="Assigns systems to FilterSets. Each FilterSet limits what kinds of messages are allowed.">MessageFilter</a> plugin for this. Call <a class="el" href="classRakNet_1_1MessageFilter.html#a480178a464758a5c61dffb631a4d37e7">MessageFilter::SetAllowMessageID()</a> including ID_TWO_WAY_AUTHENTICATION_NEGOTIATION when doing so. Also attach <a class="el" href="classRakNet_1_1MessageFilter.html" title="Assigns systems to FilterSets. Each FilterSet limits what kinds of messages are allowed.">MessageFilter</a> first in the list of plugins </p>
  132. <dl class="section note"><dt>Note</dt><dd>If other systems challenges us, and fails, you will get ID_TWO_WAY_AUTHENTICATION_INCOMING_CHALLENGE_FAILED. </dd></dl>
  133. </div><h2 class="groupheader">Member Function Documentation</h2>
  134. <a class="anchor" id="af3168d8bfabeb0fd17008e514a24736b"></a>
  135. <div class="memitem">
  136. <div class="memproto">
  137. <table class="memname">
  138. <tr>
  139. <td class="memname">bool RakNet::TwoWayAuthentication::AddPassword </td>
  140. <td>(</td>
  141. <td class="paramtype"><a class="el" href="classRakNet_1_1RakString.html">RakNet::RakString</a>&#160;</td>
  142. <td class="paramname"><em>identifier</em>, </td>
  143. </tr>
  144. <tr>
  145. <td class="paramkey"></td>
  146. <td></td>
  147. <td class="paramtype"><a class="el" href="classRakNet_1_1RakString.html">RakNet::RakString</a>&#160;</td>
  148. <td class="paramname"><em>password</em>&#160;</td>
  149. </tr>
  150. <tr>
  151. <td></td>
  152. <td>)</td>
  153. <td></td><td></td>
  154. </tr>
  155. </table>
  156. </div><div class="memdoc">
  157. <p>Adds a password to the list of passwords the system will accept. </p>
  158. <p>Each password, which is secret and not transmitted, is identified by <em>identifier</em>. <em>identifier</em> is transmitted in plaintext with the request. It is only needed because the system supports multiple password. It is used to only hash against once password on the remote system, rather than having to hash against every known password. </p>
  159. <dl class="params"><dt>Parameters</dt><dd>
  160. <table class="params">
  161. <tr><td class="paramdir">[in]</td><td class="paramname">identifier</td><td>A unique identifier representing this password. This is transmitted in plaintext and should be considered insecure </td></tr>
  162. <tr><td class="paramdir">[in]</td><td class="paramname">password</td><td>The password to add </td></tr>
  163. </table>
  164. </dd>
  165. </dl>
  166. <dl class="section return"><dt>Returns</dt><dd>True on success, false on identifier==password, either identifier or password is blank, or identifier is already in use </dd></dl>
  167. </div>
  168. </div>
  169. <a class="anchor" id="aa2e65f464fc887dc753a351e7e9fb797"></a>
  170. <div class="memitem">
  171. <div class="memproto">
  172. <table class="memname">
  173. <tr>
  174. <td class="memname">bool RakNet::TwoWayAuthentication::Challenge </td>
  175. <td>(</td>
  176. <td class="paramtype"><a class="el" href="classRakNet_1_1RakString.html">RakNet::RakString</a>&#160;</td>
  177. <td class="paramname"><em>identifier</em>, </td>
  178. </tr>
  179. <tr>
  180. <td class="paramkey"></td>
  181. <td></td>
  182. <td class="paramtype">AddressOrGUID&#160;</td>
  183. <td class="paramname"><em>remoteSystem</em>&#160;</td>
  184. </tr>
  185. <tr>
  186. <td></td>
  187. <td>)</td>
  188. <td></td><td></td>
  189. </tr>
  190. </table>
  191. </div><div class="memdoc">
  192. <p>Challenge another system for the specified identifier. </p>
  193. <p>After calling Challenge, you will get back ID_TWO_WAY_AUTHENTICATION_SUCCESS, ID_TWO_WAY_AUTHENTICATION_OUTGOING_CHALLENGE_TIMEOUT, or ID_TWO_WAY_AUTHENTICATION_OUTGOING_CHALLENGE_FAILED ID_TWO_WAY_AUTHENTICATION_SUCCESS will be returned if and only if the other system has called <a class="el" href="classRakNet_1_1TwoWayAuthentication.html#af3168d8bfabeb0fd17008e514a24736b" title="Adds a password to the list of passwords the system will accept.">AddPassword()</a> with the same identifier pair as this system. </p>
  194. <dl class="params"><dt>Parameters</dt><dd>
  195. <table class="params">
  196. <tr><td class="paramdir">[in]</td><td class="paramname">identifier</td><td>A unique identifier representing this password. This is transmitted in plaintext and should be considered insecure </td></tr>
  197. </table>
  198. </dd>
  199. </dl>
  200. <dl class="section return"><dt>Returns</dt><dd>True on success, false on remote system not connected, or identifier not previously added with <a class="el" href="classRakNet_1_1TwoWayAuthentication.html#af3168d8bfabeb0fd17008e514a24736b" title="Adds a password to the list of passwords the system will accept.">AddPassword()</a> </dd></dl>
  201. </div>
  202. </div>
  203. <a class="anchor" id="ad683e107f9c25a5d833b55d547374c02"></a>
  204. <div class="memitem">
  205. <div class="memproto">
  206. <table class="mlabels">
  207. <tr>
  208. <td class="mlabels-left">
  209. <table class="memname">
  210. <tr>
  211. <td class="memname">virtual void RakNet::TwoWayAuthentication::OnClosedConnection </td>
  212. <td>(</td>
  213. <td class="paramtype">const <a class="el" href="structRakNet_1_1SystemAddress.html">SystemAddress</a> &amp;&#160;</td>
  214. <td class="paramname"><em>systemAddress</em>, </td>
  215. </tr>
  216. <tr>
  217. <td class="paramkey"></td>
  218. <td></td>
  219. <td class="paramtype"><a class="el" href="structRakNet_1_1RakNetGUID.html">RakNetGUID</a>&#160;</td>
  220. <td class="paramname"><em>rakNetGUID</em>, </td>
  221. </tr>
  222. <tr>
  223. <td class="paramkey"></td>
  224. <td></td>
  225. <td class="paramtype"><a class="el" href="group__PLUGIN__INTERFACE__GROUP.html#ga376cc546fd6892c2ead48cd51796c8b8">PI2_LostConnectionReason</a>&#160;</td>
  226. <td class="paramname"><em>lostConnectionReason</em>&#160;</td>
  227. </tr>
  228. <tr>
  229. <td></td>
  230. <td>)</td>
  231. <td></td><td></td>
  232. </tr>
  233. </table>
  234. </td>
  235. <td class="mlabels-right">
  236. <span class="mlabels"><span class="mlabel">virtual</span></span> </td>
  237. </tr>
  238. </table>
  239. </div><div class="memdoc">
  240. <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>
  241. <dl class="params"><dt>Parameters</dt><dd>
  242. <table class="params">
  243. <tr><td class="paramdir">[in]</td><td class="paramname">systemAddress</td><td>The system whose connection was closed </td></tr>
  244. <tr><td class="paramdir">[in]</td><td class="paramname">rakNetGuid</td><td>The guid of the specified system </td></tr>
  245. <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>
  246. </table>
  247. </dd>
  248. </dl>
  249. <p>Reimplemented from <a class="el" href="classRakNet_1_1PluginInterface2.html#a80c7612ca1a5dcfeec0b52d8049a71ea">RakNet::PluginInterface2</a>.</p>
  250. </div>
  251. </div>
  252. <a class="anchor" id="a692b2d35df56e4a4c0550808d67864cc"></a>
  253. <div class="memitem">
  254. <div class="memproto">
  255. <table class="mlabels">
  256. <tr>
  257. <td class="mlabels-left">
  258. <table class="memname">
  259. <tr>
  260. <td class="memname">virtual <a class="el" href="group__PLUGIN__INTERFACE__GROUP.html#ga89998adaafb29e5d879113b992161085">PluginReceiveResult</a> RakNet::TwoWayAuthentication::OnReceive </td>
  261. <td>(</td>
  262. <td class="paramtype"><a class="el" href="structRakNet_1_1Packet.html">Packet</a> *&#160;</td>
  263. <td class="paramname"><em>packet</em></td><td>)</td>
  264. <td></td>
  265. </tr>
  266. </table>
  267. </td>
  268. <td class="mlabels-right">
  269. <span class="mlabels"><span class="mlabel">virtual</span></span> </td>
  270. </tr>
  271. </table>
  272. </div><div class="memdoc">
  273. <p>OnReceive is called for every packet. </p>
  274. <dl class="params"><dt>Parameters</dt><dd>
  275. <table class="params">
  276. <tr><td class="paramdir">[in]</td><td class="paramname">packet</td><td>the packet that is being returned to the user </td></tr>
  277. </table>
  278. </dd>
  279. </dl>
  280. <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>
  281. <p>Reimplemented from <a class="el" href="classRakNet_1_1PluginInterface2.html#aa86f33263c1648f11b8a006469272639">RakNet::PluginInterface2</a>.</p>
  282. </div>
  283. </div>
  284. <hr/>The documentation for this class was generated from the following file:<ul>
  285. <li>D:/temp/RakNet_PC/Source/<a class="el" href="TwoWayAuthentication_8h.html">TwoWayAuthentication.h</a></li>
  286. </ul>
  287. </div><!-- contents -->
  288. <!-- start footer part -->
  289. <hr class="footer"/><address class="footer"><small>
  290. Generated on Mon Jun 2 2014 20:10:29 for RakNet by &#160;<a href="http://www.doxygen.org/index.html">
  291. <img class="footer" src="doxygen.png" alt="doxygen"/>
  292. </a> 1.8.2
  293. </small></address>
  294. </body>
  295. </html>
粤ICP备19079148号