networksimulator.html 2.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  1. <HTML>
  2. <HEAD>
  3. <TITLE>Network Simulator</TITLE>
  4. <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
  5. </HEAD>
  6. <link href="RaknetManual.css" rel="stylesheet" type="text/css">
  7. <meta name="title" content="RakNet - Advanced multiplayer game networking API">
  8. </HEAD><BODY BGCOLOR="#ffffff" LINK="#003399" vlink="#003399" alink="#003399" LEFTMARGIN="0" TOPMARGIN="0" MARGINWIDTH="0" MARGINHEIGHT="0"">
  9. <span style="background-color: rgb(255, 255, 255);"><img src="RakNet_Icon_Final-copy.jpg" alt="Oculus VR, Inc." width="150" height="150"></span><BR>
  10. <BR>
  11. <table width="100%" border="0">
  12. <tr>
  13. <td bgcolor="#2c5d92" class="RakNetWhiteHeader">Network Simulator Overview</td>
  14. </tr>
  15. </table>
  16. <TABLE BORDER="0" CELLPADDING="10" CELLSPACING="0" WIDTH="100%">
  17. <TR>
  18. <TD><span class="RakNetBlueHeader">Description</span> <BR>
  19. <BR>
  20. If you are using RakNet locally, chances are you will not have real-world problems like packet loss and ping fluctuations.<BR>
  21. RakNet provides some functions to simulate those problems. </TR>
  22. </TABLE>
  23. <table width="100%" border="0">
  24. <tr>
  25. <td bgcolor="#2c5d92" class="RakNetWhiteHeader">Network Simulator Functions</td>
  26. </tr>
  27. </table>
  28. <TABLE BORDER="0" CELLPADDING="10" CELLSPACING="0" WIDTH="100%">
  29. <TR>
  30. <TD>
  31. <span class="RakNetCode">ApplyNetworkSimulator( double maxSendBPS, unsigned short minExtraPing, unsigned short extraPingVariance)</span><BR>
  32. <BR>
  33. Enables simulated ping and packet loss to the outgoing data flow.
  34. To simulate bi-directional ping and packet loss, you should call this on both the sender and the recipient, with half the total ping and maxSendBPS value on each.
  35. <p><em>maxSendBPS</em> - Maximum bits per second to send. Packetloss grows linearly. 0 to disable.<BR>
  36. <em>minExtraPing</em> - The minimum time to delay sends.<BR>
  37. <em>extraPingVariance</em> The additional random time to delay sends.<BR>
  38. <BR>
  39. <span class="RakNetCode">bool IsNetworkSimulatorActive( void )</span><BR>
  40. <BR>
  41. Returns if you previously called ApplyNetworkSimulator<BR>
  42. <BR>
  43. <BR>
  44. For a better solution, see</p>
  45. <p><a href="http://www.jenkinssoftware.com/raknet/forum/index.php?topic=1671.0">http://www.jenkinssoftware.com/raknet/forum/index.php?topic=1671.0</a></p>
  46. <table width="100%" border="0">
  47. <tr>
  48. <td bgcolor="#2c5d92" class="RakNetWhiteHeader"><img src="spacer.gif" width="8" height="1">See Also</td>
  49. </tr>
  50. </table>
  51. <TABLE BORDER="0" CELLPADDING="10" CELLSPACING="0" WIDTH="100%">
  52. <TR>
  53. <TD> <A HREF="index.html">Index</A><BR> </TD>
  54. </TR>
  55. </TABLE></TD>
  56. </TR></TABLE>
  57. </BODY>
  58. </HTML>
粤ICP备19079148号