directorydeltatransfer.html 3.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. <HTML>
  2. <HEAD>
  3. <TITLE>Directory Delta Transfer Manual</TITLE>
  4. <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
  5. <style type="text/css">
  6. <!--
  7. .style1 {color: #333333}
  8. -->
  9. </style>
  10. </HEAD>
  11. <link href="RaknetManual.css" rel="stylesheet" type="text/css">
  12. <meta name="title" content="RakNet - Advanced multiplayer game networking API">
  13. </HEAD><BODY BGCOLOR="#ffffff" LINK="#003399" vlink="#003399" alink="#003399" LEFTMARGIN="0" TOPMARGIN="0" MARGINWIDTH="0" MARGINHEIGHT="0"">
  14. <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>
  15. <BR>
  16. <table width="100%" border="0">
  17. <tr>
  18. <td bgcolor="#2c5d92" class="RakNetWhiteHeader">Directory Delta Transfer Overview</td>
  19. </tr>
  20. </table>
  21. <TABLE BORDER="0" CELLPADDING="10" CELLSPACING="0" WIDTH="100%">
  22. <TR>
  23. <TD><p><span class="RakNetBlueHeader">Send file differences between directories automatically</span><BR>
  24. <BR>
  25. DirectoryDeltaTransfer.h is useful if you allow user-moddable content. For example, if each server has a /skins directory, you could run this plugin to upload that directory to the clients. Each client that does not already have a particular skin will get it. You will get download progress notifications via a user-supplied callback. DirectoryDeltaTransfer relies on the FileListTransfer plugin to actually transmit hte files.</p>
  26. <p>Usage:</p>
  27. <ol>
  28. <li>Attach the plugin and connect to the remote system</li>
  29. <li>Server and client: Call directoryDeltaTransfer.SetFileListTransferPlugin(&amp;fileListTransfer);</li>
  30. <li>Server: set the application directory: <span class="style1"><code> directoryDeltaTransfer.SetApplicationDirectory(&quot;c:\myGame&quot;);</code></span></li>
  31. <li>Server: set the download directory: <span class="RakNetCode">directoryDeltaTransfer.AddUploadsFromSubdirectory(&quot;skins&quot;);</span></li>
  32. <li>Client: to download call: <span class="RakNetCode">directoryDeltaTransfer.DownloadFromSubdirectory(&quot;skins&quot;, &quot;downloaded\skins&quot;, true, serverAddress, &amp;transferCallback, HIGH_PRIORITY, 0);</span></li>
  33. <li>Client: Wait for the callback member <span class="RakNetCode">OnFileProgress()</span>. When onFileStruct-&gt;fileIndex is equal to onFileStruct-&gt;setCount this download is done.</li>
  34. </ol>
  35. <p>For full details on all parameters and other available functions, see the header file DirectoryDeltaTransfer.h and the sample at <em>Samples/DirectoryDeltaTransfer</em></p>
  36. </TR>
  37. </TABLE>
  38. <table width="100%" border="0">
  39. <tr>
  40. <td bgcolor="#2c5d92" class="RakNetWhiteHeader"><img src="spacer.gif" width="8" height="1">See Also</td>
  41. </tr>
  42. </table>
  43. <TABLE BORDER="0" CELLPADDING="10" CELLSPACING="0" WIDTH="100%">
  44. <TR>
  45. <TD> <A HREF="index.html">Index</A><br>
  46. <A HREF="filelisttransfer.html">FileListTransfer</A> <BR> </TD>
  47. </TR>
  48. </TABLE></TD>
  49. </TR></TABLE>
  50. </BODY>
  51. </HTML>
粤ICP备19079148号