Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(82)

Unified Diff: net/base/net_log_event_type_list.h

Issue 8200011: Add NetLog support to UDP sockets. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Hex encode bytes Created 9 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: net/base/net_log_event_type_list.h
===================================================================
--- net/base/net_log_event_type_list.h (revision 104713)
+++ net/base/net_log_event_type_list.h (working copy)
@@ -288,6 +288,19 @@
EVENT_TYPE(SUBMITTED_TO_RESOLVER_THREAD)
// ------------------------------------------------------------------------
+// Socket (Shared by stream and datagram sockets)
+// ------------------------------------------------------------------------
+
+// Marks the begin/end of a socket (TCP/SOCKS/SSL/UDP).
+//
+// The BEGIN phase contains the following parameters:
+//
+// {
+// "source_dependency": <Source identifier for the controlling entity>,
+// }
+EVENT_TYPE(SOCKET_ALIVE)
+
+// ------------------------------------------------------------------------
// StreamSocket
// ------------------------------------------------------------------------
@@ -300,10 +313,11 @@
// "address_list": <List of network address strings>,
// }
//
-// And the END event will contain the following parameters on failure:
+// And the END event will contain the following parameters:
//
// {
-// "net_error": <Net integer error code>,
+// "net_error": <Net integer error code, on error>,
+// "source_address": <Local source address of the connection, on success>,
// }
EVENT_TYPE(TCP_CONNECT)
@@ -335,9 +349,6 @@
// }
EVENT_TYPE(TCP_ACCEPT)
-// Marks the begin/end of a socket (TCP/SOCKS/SSL).
-EVENT_TYPE(SOCKET_ALIVE)
-
// This event is logged to the socket stream whenever the socket is
// acquired/released via a ClientSocketHandle.
//
@@ -453,6 +464,45 @@
EVENT_TYPE(SSL_SOCKET_BYTES_RECEIVED)
// ------------------------------------------------------------------------
+// DatagramSocket
+// ------------------------------------------------------------------------
+
+// The start/end of a UDP client connecting.
+//
+// The START event contains these parameters:
+//
+// {
+// "address": <Remote address being connected to>,
+// }
+//
+// And the END event will contain the following parameter:
+//
+// {
+// "net_error": <Net integer error code, on failure>,
+// }
+EVENT_TYPE(UDP_CONNECT)
+
+// The specified number of bytes were transferred on the socket.
+// The following parameters are attached:
+// {
+// "address": <Remote address of data transfer. Not present when not
+// specified for UDP_BYTES_SENT events>,
+// "byte_count": <Number of bytes that were just received>,
+// "hex_encoded_bytes": <The exact bytes received, as a hexadecimal string.
+// Only present when byte logging is enabled>,
+// }
+EVENT_TYPE(UDP_BYTES_RECEIVED)
+EVENT_TYPE(UDP_BYTES_SENT)
+
+// Logged when an error occurs while reading or writing to/from a UDP socket.
+// The following parameters are attached:
+// {
+// "net_error": <Net error code>,
+// }
+EVENT_TYPE(UDP_RECEIVE_ERROR)
+EVENT_TYPE(UDP_SEND_ERROR)
+
+// ------------------------------------------------------------------------
// ClientSocketPoolBase::ConnectJob
// ------------------------------------------------------------------------
@@ -1111,9 +1161,9 @@
// The END phase contains the following parameters:
//
// {
-// "net_error": <The net error code for the failure>,
// "ip_address_list": <The result of the resolution process,
// an IPAddressList>
+// "net_error": <The net error code for the failure, if any>,
// }
EVENT_TYPE(DNS_TRANSACTION)

Powered by Google App Engine
This is Rietveld 408576698