Index: net/udp/udp_socket_libevent.h |
=================================================================== |
--- net/udp/udp_socket_libevent.h (revision 105801) |
+++ net/udp/udp_socket_libevent.h (working copy) |
@@ -10,6 +10,7 @@ |
#include "base/memory/scoped_ptr.h" |
#include "base/message_loop.h" |
#include "base/threading/non_thread_safe.h" |
+#include "net/base/address_list_net_log_param.h" |
#include "net/base/completion_callback.h" |
#include "net/base/rand_callback.h" |
#include "net/base/io_buffer.h" |
@@ -19,8 +20,6 @@ |
namespace net { |
-class BoundNetLog; |
- |
class UDPSocketLibevent : public base::NonThreadSafe { |
public: |
UDPSocketLibevent(DatagramSocket::BindType bind_type, |
@@ -145,6 +144,14 @@ |
void DidCompleteRead(); |
void DidCompleteWrite(); |
+ // Handles stats and logging. |result| is the number of bytes transferred, on |
+ // success, or the net error code on failure. Returns |result|. |
+ // On success, LogRead takes in a sockaddr and its length, which are |
+ // mandatory, while LogWrite takes in an optional IPEndPoint. |
+ int LogRead(int result, const char* bytes, socklen_t addr_len, |
+ const sockaddr* addr) const; |
+ int LogWrite(int result, const char* bytes, const IPEndPoint* address) const; |
+ |
// Returns the OS error code (or 0 on success). |
int CreateSocket(const IPEndPoint& address); |
@@ -156,6 +163,7 @@ |
const IPEndPoint* address, |
OldCompletionCallback* callback); |
+ int InternalConnect(const IPEndPoint& address); |
int InternalRecvFrom(IOBuffer* buf, int buf_len, IPEndPoint* address); |
int InternalSendTo(IOBuffer* buf, int buf_len, const IPEndPoint* address); |