index.html 17 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253
  1. <HTML>
  2. <HEAD>
  3. <TITLE>Oculus VR, Inc.</TITLE>
  4. <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
  5. <link href="RaknetManual.css" rel="stylesheet" type="text/css">
  6. </HEAD>
  7. <link href="RaknetManual.css" rel="stylesheet" type="text/css">
  8. <meta name="title" content="RakNet - Advanced multiplayer game networking API">
  9. </HEAD>
  10. <BODY BGCOLOR="#ffffff" LINK="#003399" vlink="#003399" alink="#003399" LEFTMARGIN="0" TOPMARGIN="0" MARGINWIDTH="0" MARGINHEIGHT="0"">
  11. <img src="RakNet_Icon_Final-copy.jpg" alt="Oculus VR, Inc." width="150" height="150"><BR>
  12. <BR>
  13. <table width="100%" border="0"><tr>
  14. <td bgcolor="2c5d92"><font color="#FFFFFF" size="3" face="Arial, Helvetica, sans-serif" class="RakNetWhiteHeader"><span class="RakNetWhiteHeader">&nbsp;Introduction</span></td>
  15. </tr></table>
  16. <TABLE BORDER="0" CELLPADDING="10" CELLSPACING="0" WIDTH="100%"><TR>
  17. <TD> <p><span class="RakNetBlueHeader">Manual Last Updated
  18. 11/19/2012. See readme.txt for the current version number.</span></p>
  19. <p>RakNet is a high-performance network API designed for games or other high-performance network applications. RakNet is intended to provide most to all features modern games need, such as a master server, autopatcher, voice chat, and cross-platform capabilities. RakNet currently supports Windows, PlayStation 3, XBOX 360, PlayStation Vita, Linux, Mac, the iPhone, Android, and Windows Phone 8.</p></TD>
  20. </TR></TABLE>
  21. <table width="100%" border="0"><tr><td bgcolor="2c5d92">&nbsp;<span class="RakNetWhiteHeader">Quick Start</span></td>
  22. </tr></table>
  23. <TABLE BORDER="0" CELLPADDING="10" CELLSPACING="0" WIDTH="100%"><TR>
  24. <TD><p><A HREF="multiplayergamecomponents.html">Components of a multiplayer game</A><BR>
  25. <A HREF="systemoverview.html">System Overview</A><BR>
  26. <A HREF="detailedimplementation.html">Detailed Implementation</A><BR>
  27. <A HREF="tutorial.html">Tutorial</A><BR>
  28. <A HREF="compilersetup.html">Compiler Setup (Visual Studio)</A><BR>
  29. <A HREF="compilersetup_xcode.html">Compiler Setup (XCode)</A><BR>
  30. <A HREF="dependencies.html">Optional 3rd party dependencies</A><br>
  31. <a href="http://www.jenkinssoftware.com/forum/index.php?topic=584.0">HowTo</a><BR>
  32. </p></TD></TR></TABLE>
  33. <table width="100%" border="0"><tr>
  34. <td bgcolor="2c5d92" class="RakNetWhiteHeader">&nbsp;Training Videos</td>
  35. </tr>
  36. </table>
  37. <TABLE BORDER="0" CELLPADDING="10" CELLSPACING="0" WIDTH="100%"><TR>
  38. <TD><p><A HREF="http://www.youtube.com/watch?v=sez3o00uCqU">Introduction:Major Features</A><br>
  39. <A HREF="http://www.jenkinssoftware.com/raknet/manual/RPC3Video.htm">Tutorial 1: RPC3</A><BR>
  40. <A HREF="http://www.jenkinssoftware.com/raknet/manual/ReplicaManager3Video.htm">Tutorial 2: ReplicaManager3</A><BR>
  41. <A HREF="http://www.jenkinssoftware.com/raknet/manual/AutopatcherVideo.htm">Tutorial 3: Autopatcher</A><BR>
  42. <A HREF="http://www.youtube.com/watch?v=w4OUGeLKcss">Tutorial 4: A complete sample covering object replication, teams, player hosted rooms and lobbies, NAT traversal, and host migration</A><br>
  43. </p></TD></TR></TABLE>
  44. <table width="100%" border="0"><tr>
  45. <td bgcolor="2c5d92" class="RakNetWhiteHeader">&nbsp;Feature Videos</td>
  46. </tr>
  47. </table>
  48. <TABLE BORDER="0" CELLPADDING="10" CELLSPACING="0" WIDTH="100%"><TR>
  49. <TD><p><A HREF="http://www.jenkinssoftware.com/raknet/manual/SQLite3LoggerPluginVideo.html">Networked logging with SQLiteClientLoggerPlugin</A><br>
  50. </p></TD></TR></TABLE>
  51. <table width="100%" border="0"><tr><td bgcolor="2c5d92">
  52. <img src="spacer.gif" width="8" height="1"><span class="RakNetWhiteHeader">The Basics</span></td>
  53. </tr></table>
  54. <TABLE BORDER="0" CELLPADDING="10" CELLSPACING="0" WIDTH="100%"><TR><TD>
  55. <p><a href="startup.html">Startup</a> <BR>
  56. - Starting up RakPeerInterface, and the thread sleep timer explained</p>
  57. <p><a href="connecting.html">Connecting</a> <BR>
  58. - How to find and connect to other systems, and what to do if there are problems </p>
  59. <p><A HREF="creatingpackets.html">Creating Packets</A><BR>
  60. - How to create custom packets using structures and bitstreams, and how to encode timestamps.<BR>
  61. <BR>
  62. <A HREF="sendingpackets.html">Sending Packets</A><BR>
  63. - How to send packets already prepared, and what parameters to use.<BR>
  64. <BR>
  65. <A HREF="receivingpackets.html">Receiving Packets</A><BR>
  66. - How to converting raw data back to a packet you can read via a structure or bitstream.</p>
  67. <p><A HREF="systemaddresses.html">SystemAddress</A><BR>
  68. - Describes the purpose and use of the SystemAddress structure used in packets and in some function parameters.</p>
  69. <p><A HREF="bitstreams.html">Bitstreams</A><BR>
  70. - An overview of RakNet's bitstream class, used throughout the API.</p>
  71. <p><A HREF="reliabilitytypes.html">Reliability types</A><BR>
  72. - Covers parameters you can use to control how data gets sent.</p>
  73. <p><A HREF="networkmessages.html">Network Messages</A><BR>
  74. - Gives an overview of the messages the API will send to the user. This is also listed in MessageIdentifiers.h.
  75. <p><A HREF="timestamping.html">Timestamping your packets</A><BR>
  76. - Covers the purpose of timestamps.<BR>
  77. <BR>
  78. <A HREF="networkidobject.html">NetworkIDObject</A><BR>
  79. - A Utility class to give each class instance a unique identifier that all systems can share.</p>
  80. <p><A HREF="statistics.html">Statistics</A><BR>
  81. - The statistics that RakNet provides.<BR>
  82. <BR>
  83. <A HREF="secureconnections.html">Secure connections</A><BR>
  84. - How to activate and use secure connections.</p>
  85. <p><a href="http://masterserver2.raknet.com/">Master server</a><br>
  86. - Our hosted master server service, to find other games on the internet.
  87. </p>
  88. <p><a href="cloudhosting.html">Cloud hosting</a><br>
  89. - Setting up RakNet with cloud-hosted services</p>
  90. <p><a href="rackspaceinterface.html">Rackspace interface</a><br>
  91. - C++ interface to Rackspace, allowing you to programatically create, delete, reboot, image, and perform other operations on servers.</p>
  92. <p><a href="nattraversalarchitecture.html">NAT traversal architecture</a><br>
  93. - How to use combine UPNP, NAT type detection, NAT punchthrough, and Router2 so P2P connections complete quickly and efficiently.<BR>
  94. <BR>
  95. <A HREF="preprocessordirectives.html">Preprocessor Directives</A><BR>
  96. - Enables you to rebuild the library with different code settings.</p>
  97. <p><A HREF="custommemorymanagement.html">Custom Memory Management</A><BR>
  98. - For consoles, memory tracking, etc.</p>
  99. <p><a href="ipv6support.html">IPV6 support</a><br>
  100. - The next-generation IP address
  101. format.</p>
  102. <p><a href="marmalade.html">Marmalade integration</a><br>
  103. - Integration with the Marmalade SDK for the IOS and Android platforms.</p></TD></TR></TABLE>
  104. <table width="100%" border="0"><tr><td bgcolor="#2c5d92"><font color="#FFFFFF" size="3" face="Arial, Helvetica, sans-serif"><strong><span class="RakNetWhiteHeader">&nbsp;Plugins</span></strong></td>
  105. </tr></table>
  106. <TABLE BORDER="0" CELLPADDING="10" CELLSPACING="0" WIDTH="100%"><TR><TD>
  107. <A HREF="plugininterface.html">Plugin Interface 2</A><BR>
  108. - The base class of all plugins<BR>
  109. <p><A HREF="autopatcher.html">Autopatcher</A><BR>
  110. - Overview of the autopatcher included with RakNet.</p>
  111. <p><a href="RPC3Video.htm">RPC3</a><br>
  112. - Call C and C++ functions with native parameter lists, using Boost for additional functionality.</p>
  113. <p><a href="rpc4.html">RPC4</a><br>
  114. - Call C functions, no external dependencies.</p>
  115. <p><A HREF="connectiongraph.html">Connection Graph</A><BR>
  116. - A plugin-in that maintains a graph of the entire network.</p>
  117. <p><a href="directorydeltatransfer.html">Directory Delta Transfer</a><br>
  118. - Send changed or missing files between directories. In essence, a simple autopatcher that can be used for transmitting levels, skins, etc.<br>
  119. <br>
  120. <a href="filelisttransfer.html">File List Transfer</a><br>
  121. - Plugin to send a list of files, encoded in the FileList structure<br>
  122. <br>
  123. <A HREF="fullyconnectedmesh2.html">Fully Connected Mesh 2</A><BR>
  124. - A plug-in for peer to peer games, for host determination and verified connectivity to the mesh.</p>
  125. <p><a href="lobby.html">Lobby2Client - PC</a><br>
  126. - PostgreSQL backed database for game data, including users, friends, clans, messages
  127. </p>
  128. <p><a href="steamlobby.html">Lobby2Client - Steam</a><br>
  129. - Steamworks powered backend, using the Lobby2 interface.</p>
  130. <p><a href="ps3lobby.html">Lobby2Client - PS3<br>
  131. </a>- PS3 NP backend, using the Lobby2 interface.</p>
  132. <p><a href="xbox360lobby.html">Lobby2Client - XBOX 360</a><br>
  133. - LIVE backend and voice chat support, using the Lobby2 interface with support for RakVoiceXBOX360Plugin and FullyConnectedMesh2</p>
  134. <p><a href="gfwllobby.html">Lobby2Client - Games for Windows Live</a><br>
  135. - Same as XBOX 360 backend but runs on Windows</p>
  136. <p><a href="messagefilter.html">Message Filter</a><br>
  137. - Prevent unwanted network messages based on sender for added security.</p>
  138. <p><A HREF="nattypedetection.html">NAT type detection</A><BR>
  139. - Find out what kind of NAT you are behind to keep users that will probably not be able to connect separate</p>
  140. <p><A HREF="natpunchthrough.html">NAT punchthrough</A><BR>
  141. - Connect users behind NAT. Required for peer to peer, voice communication, or to allow players to host their own servers.</p>
  142. <p><a href="packetlogger.html">Packet Logger</a><br>
  143. - Print network traffic to the screen, file, or elsewhere.</p>
  144. <p><A HREF="rakvoice.html">RakVoice</A><BR>
  145. - Overview of RakVoice. Refer to RakVoice.h for full implementation and function details. </p>
  146. <p><a href="readyevent.html">Ready Event</a><br>
  147. - Synchronize when a group of systems are all ready on a common identifier, useful in peer to peer enviroments to start games at the same time, or progress turns in a turn based game.</p>
  148. <p><A HREF="replicamanager3.html">Replica Manager 3</A><BR>
  149. - A plug-in that provides management for your game objects and players to make serialization, scoping, and object creation and destruction easier.<BR>
  150. <BR>
  151. <a href="router.html">Router2</a><br>
  152. - Send network messages to one or more remote systems we are not directly connected to<br>
  153. <br>
  154. <a href="sqlite3loggerplugin.html">SQLite3LoggerPlugin</a><br>
  155. - Create networked log files using SQLite. Based on <a href="sqlite3plugin.html">SQLite3Plugin</a></p>
  156. <p><a href="sqlite3plugin.html">SQLite3Plugin</a><br>
  157. - Execute statements over the network with SQLite (replacement for LightweightDatabase)</p>
  158. <p><a href="teammanager.html">TeamManager</a><br>
  159. - Manages lists of teams and team members. Supports client/server and peer to peer</p>
  160. <p><a href="twowayauthentication.html">TwoWayAuthentication</a><br>
  161. - Implements <a href="http://en.wikipedia.org/wiki/Mutual_authentication">Two Way Authentication</a>, validating a predesignated password without transmitting the password. </p></TD></TR></TABLE>
  162. <table width="100%" border="0"><tr>
  163. <td bgcolor="#2c5d92">&nbsp;<strong><span class="RakNetWhiteHeader">C# and SWIG</span></strong></td>
  164. </tr></table>
  165. <TABLE BORDER="0" CELLPADDING="10" CELLSPACING="0" WIDTH="100%"><TR><TD>
  166. <p><a href="swigtutorial.html">Swig Tutorial</a><br>
  167. - How to run RakNet from C# using SWIG and possibly Mono.</p>
  168. <p><a href="csharpunity.html">Unity Integration</a><br>
  169. - How RakNet is used with Unity, and how to upgrade to version 4.x</p>
  170. </TD></TR></TABLE>
  171. <table width="100%" border="0"><tr>
  172. <td bgcolor="#2c5d92">&nbsp;<strong><span class="RakNetWhiteHeader">Utilities</span></strong></td>
  173. </tr></table>
  174. <TABLE BORDER="0" CELLPADDING="10" CELLSPACING="0" WIDTH="100%"><TR><TD>
  175. <p><a href="crashreporter.html">Crash Reporter</a><br>
  176. - Sends mini-dumps when your application crashes, writing to disk and/or sending an email.</p>
  177. <p><a href="consoleserver.html">Console Server</a><br>
  178. - Text based backdoor to a server using either secure RakNet or telnet, allowing execution of predesignated commands or arbitrary command strings.</p>
  179. <p><a href="emailsender.html">Email Sender</a><br>
  180. - Used by the crash reporter to send emails via TCP</p>
  181. <p><a href="stringcompressor.html">String Compressor / String Table</a><br>
  182. - Used to encode strings with less bandwidth and more security.
  183. <p><a href="tcpinterface.html">TCP Interface</a><br>
  184. - Wrapper class for TCP connections</p>
  185. </TD></TR></TABLE>
  186. <table width="100%" border="0"><tr>
  187. <td bgcolor="#2c5d92"><font color="#FFFFFF" size="3" face="Arial, Helvetica, sans-serif"><strong><span class="RakNetWhiteHeader">&nbsp;3D Demos</span></strong></td>
  188. </tr></table>
  189. <TABLE BORDER="0" CELLPADDING="10" CELLSPACING="0" WIDTH="100%"><TR><TD>
  190. <p><a href="ogre3dinterpdemo.html">Ogre 3D Interpolation Demo</a><br>
  191. - Use <A HREF="http://www.ogre3d.org/">Ogre 3D</A> to show a demo of popping popcorn over a client/server network, using <a href="replicamanager3.html">ReplicaManager3</a></p>
  192. <p><a href="irrlichtfpsdemo.html">Irrlicht FPS Demo</a><br>
  193. - Use <A HREF="http://irrlicht.sourceforge.net/">Irrlicht</A> to show a 3D FPS demo using peer to peer with NAT punchthrough. Also uses <a href="replicamanager3.html">ReplicaManager3</a></p>
  194. </TD></TR></TABLE>
  195. <table width="100%" border="0"><tr>
  196. <td bgcolor="#2c5d92"><font color="#FFFFFF" size="3" face="Arial, Helvetica, sans-serif"><strong><span class="RakNetWhiteHeader">&nbsp;Technical Design Documents</span></strong></td>
  197. </tr></table>
  198. <TABLE BORDER="0" CELLPADDING="10" CELLSPACING="0" WIDTH="100%"><TR>
  199. <TD>
  200. <a href="RakNetUML.jpg">UML Diagram</a><BR>
  201. <a href="bluetooth.html">Potential Bluetooth support</a>
  202. </TD></TR></TABLE>
  203. <table width="100%" border="0"><tr><td bgcolor="#2c5d92"><font color="#FFFFFF" size="3" face="Arial, Helvetica, sans-serif"><strong><span class="RakNetWhiteHeader">&nbsp;Data Structures</span></strong></td>
  204. </tr></table>
  205. <TABLE BORDER="0" CELLPADDING="10" CELLSPACING="0" WIDTH="100%"><TR><TD>
  206. <p>DS_BinarySearchTree.h - <a href="http://en.wikipedia.org/wiki/Binary_search_tree">Binary search tree</a>, and an <a href="http://en.wikipedia.org/wiki/AVL_tree">AVL balanced</a> binary search tree.<br>
  207. DS_BPlusTree.h - <a href="http://en.wikipedia.org/wiki/B%2B_tree">BPlus tree</a> for fast lookup, delete, and insert.<br>
  208. DS_BytePool.h - Returns data blocks at certain size thresholds to reduce memory fragmentation.<br>
  209. DS_ByteQueue.h - A queue specialized for reading and writing bytes.<br>
  210. DS_Heap.h - <a href="http://en.wikipedia.org/wiki/Heap_%28data_structure%29">Heap data structure</a>, includes both minheap and maxheap.<br>
  211. DS_HuffmanEncodingTree.h - <a href="http://en.wikipedia.org/wiki/Huffman_coding">Huffman encoding tree</a>, used to find the minimal bitwise representation given a frequency table.<br>
  212. DS_HuffmanEncodingTreeFactory.h - Creates instances of the Huffman encoding tree.<br>
  213. DS_HuffmanEncodingTreeNode.h - Node in the Huffman encoding tree.<br>
  214. DS_LinkedList.h - Standard <a href="http://en.wikipedia.org/wiki/Linked_list">linked list</a>.<br>
  215. DS_List.h - Dynamic <a href="http://en.wikipedia.org/wiki/Array">array</a> (sometimes improperly called a vector). Also doubles as a <a href="http://en.wikipedia.org/wiki/Stack_%28data_structure%29">stack</a>.<br>
  216. DS_Map.h - (<a href="http://en.wikipedia.org/wiki/Associative_array">Associative array</a>) Ordered list with an per-element sort key.<br>
  217. DS_MemoryPool.h - Allocate and free reused instances of a fixed size structure, used to reduce memory fragmentation.<BR>
  218. DS_Multilist_h - (Added 4/8/2009) Combines a list, stack, queue, and ordered list into one class with a common interface.<BR>
  219. DS_OrderedChannelHeap.h - Maxheap which returns a node based on the relative weight of the node's associated channel. Used for task scheduling with priorities.<br>
  220. DS_OrderedList.h - List ordered by an arbitrary key via <a href="http://en.wikipedia.org/wiki/Quicksort">quicksort</a>.<br>
  221. DS_Queue.h - Standard <a href="http://en.wikipedia.org/wiki/Queue_%28data_structure%29">queue</a> implemented with an array<br>
  222. DS_QueueLinkedList.h - Standard queue implemented with a <a href="http://en.wikipedia.org/wiki/Linked_list">linked list</a><br>
  223. DS_RangeList.h - Stores a list of numerical values, and when the values are sequential, represents them as a range rather than individual elements. Useful when storing many values that are usually sequential.<br>
  224. DS_Table.h - <a href="http://en.wikipedia.org/wiki/Table_%28database%29">Table</a> with columns and rows, and operations on that table.<br>
  225. DS_Tree.h - Noncyclic <a href="http://en.wikipedia.org/wiki/Graph_%28data_structure%29">graph</a><br>
  226. DS_WeightedGraph.h - Graph with weighted edges, used for routing via <a href="http://en.wikipedia.org/wiki/Dijkstra%27s_algorithm">Dijkstra's algorithm</a><br>
  227. RakString - String implementation, up to 4.5 times faster than std::string</p></TD>
  228. </TR></TABLE>
  229. <table width="100%" border="0"><tr><td bgcolor="#2c5d92" class="RakNetWhiteHeader"><font color="#FFFFFF" size="3" face="Arial, Helvetica, sans-serif" class="RakNetWhiteHeader">&nbsp;Support</td>
  230. </tr></table>
  231. <TABLE BORDER="0" CELLPADDING="10" CELLSPACING="0" WIDTH="100%"><TR><TD>
  232. <A HREF="faq.html">FAQ</A><br>
  233. <a href="debuggingdisconnects.html">Debugging Disconnections</a><BR>
  234. <A HREF="programmingtips.html">Programming Tips</A><BR>
  235. <A HREF="revisionlog.html">Revision Log</A><BR>
  236. </TD></TR></TABLE>
  237. </BODY>
  238. </HTML>
粤ICP备19079148号