SQLiteClientLogger_PacketLogger.h 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. /*
  2. * Copyright (c) 2014, Oculus VR, Inc.
  3. * All rights reserved.
  4. *
  5. * This source code is licensed under the BSD-style license found in the
  6. * LICENSE file in the root directory of this source tree. An additional grant
  7. * of patent rights can be found in the PATENTS file in the same directory.
  8. *
  9. */
  10. /// \file
  11. /// \brief This will write all incoming and outgoing network messages the SQLiteClientLoggerPlugin
  12. ///
  13. #ifndef __SQL_LITE_CLIENT_LOGGER_PACKET_LOGGER_H_
  14. #define __SQL_LITE_CLIENT_LOGGER_PACKET_LOGGER_H_
  15. #include "PacketLogger.h"
  16. namespace RakNet
  17. {
  18. /// \ingroup PACKETLOGGER_GROUP
  19. /// \brief Packetlogger that outputs to a file
  20. class RAK_DLL_EXPORT SQLiteClientLogger_PacketLogger : public PacketLogger
  21. {
  22. public:
  23. SQLiteClientLogger_PacketLogger();
  24. virtual ~SQLiteClientLogger_PacketLogger();
  25. virtual void OnDirectSocketSend(const char *data, const BitSize_t bitsUsed, SystemAddress remoteSystemAddress);
  26. virtual void OnDirectSocketReceive(const char *data, const BitSize_t bitsUsed, SystemAddress remoteSystemAddress);
  27. virtual void OnInternalPacket(InternalPacket *internalPacket, unsigned frameNumber, SystemAddress remoteSystemAddress, RakNet::TimeMS time, bool isSend);
  28. virtual void OnAck(unsigned int messageNumber, SystemAddress remoteSystemAddress, RakNet::TimeMS time);
  29. virtual void OnPushBackPacket(const char *data, const BitSize_t bitsUsed, SystemAddress remoteSystemAddress);
  30. virtual void WriteMiscellaneous(const char *type, const char *msg);
  31. protected:
  32. virtual void WriteLog(const char *str) {}
  33. };
  34. }
  35. #endif
粤ICP备19079148号