udp_net_log_parameters.h 1.1 KB

1234567891011121314151617181920212223242526272829303132333435
  1. // Copyright (c) 2012 The Chromium Authors. All rights reserved.
  2. // Use of this source code is governed by a BSD-style license that can be
  3. // found in the LICENSE file.
  4. #ifndef NET_SOCKET_UDP_NET_LOG_PARAMETERS_H_
  5. #define NET_SOCKET_UDP_NET_LOG_PARAMETERS_H_
  6. #include "net/base/network_handle.h"
  7. #include "net/log/net_log_event_type.h"
  8. namespace base {
  9. class Value;
  10. }
  11. namespace net {
  12. class NetLogWithSource;
  13. class IPEndPoint;
  14. // Emits a NetLog event with parameters describing a UDP receive/send event.
  15. // |bytes| are only logged when byte logging is enabled. |address| may be
  16. // nullptr.
  17. void NetLogUDPDataTransfer(const NetLogWithSource& net_log,
  18. NetLogEventType type,
  19. int byte_count,
  20. const char* bytes,
  21. const IPEndPoint* address);
  22. // Creates NetLog parameters describing a UDP connect event.
  23. base::Value CreateNetLogUDPConnectParams(const IPEndPoint& address,
  24. handles::NetworkHandle network);
  25. } // namespace net
  26. #endif // NET_SOCKET_UDP_NET_LOG_PARAMETERS_H_