summaryrefslogtreecommitdiffstats
path: root/net/udp/udp_net_log_parameters.h
blob: c29834f7d7996c17ce57c0da2c7f5f0b21c8ed42 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
// Copyright (c) 2012 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#ifndef NET_UDP_UDP_NET_LOG_PARAMETERS_H_
#define NET_UDP_UDP_NET_LOG_PARAMETERS_H_

#include "net/log/net_log.h"

namespace net {

class IPEndPoint;

// Creates a NetLog callback that returns parameters describing a UDP
// receive/send event.  |bytes| are only logged when byte logging is
// enabled.  |address| may be NULL.  |address| (if given) and |bytes|
// must be valid for the life of the callback.
NetLog::ParametersCallback CreateNetLogUDPDataTranferCallback(
    int byte_count,
    const char* bytes,
    const IPEndPoint* address);

// Creates a NetLog callback that returns parameters describing a UDP
// connect event.  |address| cannot be NULL, and must remain valid for
// the lifetime of the callback.
NetLog::ParametersCallback CreateNetLogUDPConnectCallback(
    const IPEndPoint* address);

}  // namespace net

#endif  // NET_UDP_UDP_NET_LOG_PARAMETERS_H_