Chromium Code Reviews| Index: net/udp/udp_socket_win.h |
| =================================================================== |
| --- net/udp/udp_socket_win.h (revision 105148) |
| +++ net/udp/udp_socket_win.h (working copy) |
| @@ -21,8 +21,6 @@ |
| namespace net { |
| -class BoundNetLog; |
| - |
| class UDPSocketWin : public base::NonThreadSafe { |
| public: |
| UDPSocketWin(DatagramSocket::BindType bind_type, |
| @@ -130,9 +128,16 @@ |
| void DoWriteCallback(int rv); |
| void DidCompleteRead(); |
| void DidCompleteWrite(); |
| - bool ProcessSuccessfulRead(int num_bytes, IPEndPoint* address); |
| - void ProcessSuccessfulWrite(int num_bytes); |
| + // Handles stats and logging. Also, if |address| is non-NULL, attempts |
| + // to populate it using data from |recv_addr_storage_|. Returns false if |
| + // unable to convert |recv_addr_storage_| to an IPEndPoint. |
| + bool ProcessSuccessfulRead(int num_bytes, const char* bytes, |
| + IPEndPoint* address) const; |
| + // Handles stats and logging. |
| + void ProcessSuccessfulWrite(int num_bytes, const char* bytes, |
| + const IPEndPoint* address) const; |
| + |
| // Returns the OS error code (or 0 on success). |
| int CreateSocket(const IPEndPoint& address); |
| @@ -144,6 +149,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); |
| @@ -182,6 +188,10 @@ |
| socklen_t recv_addr_len_; |
| IPEndPoint* recv_from_address_; |
| + // Cached copy of the current address we're sending to, if any. Used for |
| + // logging. |
| + scoped_ptr<IPEndPoint> send_to_address_; |
|
Sergey Ulanov
2011/10/14 20:15:47
Does this need to be a pointer? Can we store it by
mmenke
2011/10/17 17:35:20
It can be null, and there's no IPEndPoint::IsValid
|
| + |
| // The buffer used by InternalWrite() to retry Write requests |
| scoped_refptr<IOBuffer> write_iobuffer_; |