packetlogger.html 2.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. <HTML>
  2. <HEAD>
  3. <TITLE>PacketLogger manual</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">&nbsp;Packet Logger Overview</td>
  14. </tr>
  15. </table>
  16. <TABLE BORDER="0" CELLPADDING="10" CELLSPACING="0" WIDTH="100%">
  17. <TR>
  18. <TD><p><span class="RakNetBlueHeader">Log incoming and outgoing messages for debugging</span><BR>
  19. <BR>
  20. The PacketLogger is a plugin that will print all incoming and outgoing messages for debugging. It parses the message where necessary, indicating if a message is an RPC, or a timestamp. It also converts the numerical MessageID into the corresponding string. The output by default is comma delineated, readable as a <a href="http://en.wikipedia.org/wiki/Comma-separated_values">CSV file</a>, and goes to the console with printf().</p>
  21. <p>To change the output destination, derive from PacketLogger and override WriteLog();</p>
  22. <p>Aside from PacketLogger itself, the following implementations are already included:</p>
  23. <ul>
  24. <li>PacketConsoleLogger - For use with the ConsoleServer.</li>
  25. <li>PacketFileLogger - Logs to a file. Call StartLog() to open the file.</li>
  26. <li>ThreadsafePacketLogger - Same as PacketLogger, but delays WriteLog() until out of the RakNet thread. Use this if you do anything significant with the logs (anything other than printf).</li>
  27. </ul>
  28. </TR>
  29. </TABLE>
  30. <table width="100%" border="0">
  31. <tr>
  32. <td bgcolor="#2c5d92" class="RakNetWhiteHeader"><img src="spacer.gif" width="8" height="1">See Also</td>
  33. </tr>
  34. </table>
  35. <TABLE BORDER="0" CELLPADDING="10" CELLSPACING="0" WIDTH="100%">
  36. <TR>
  37. <TD> <A HREF="index.html">Index</A><BR> </TD>
  38. </TR>
  39. </TABLE></TD>
  40. </TR></TABLE>
  41. </BODY>
  42. </HTML>
粤ICP备19079148号