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

Side by Side Diff: content/browser/renderer_host/p2p/socket_host_udp.h

Issue 1345583004: Wire up transport sequence number and send time. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Address change in libjingle Created 5 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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef CONTENT_BROWSER_RENDERER_HOST_P2P_SOCKET_HOST_UDP_H_ 5 #ifndef CONTENT_BROWSER_RENDERER_HOST_P2P_SOCKET_HOST_UDP_H_
6 #define CONTENT_BROWSER_RENDERER_HOST_P2P_SOCKET_HOST_UDP_H_ 6 #define CONTENT_BROWSER_RENDERER_HOST_P2P_SOCKET_HOST_UDP_H_
7 7
8 #include <deque> 8 #include <deque>
9 #include <set> 9 #include <set>
10 #include <vector> 10 #include <vector>
11 11
12 #include "base/compiler_specific.h" 12 #include "base/compiler_specific.h"
13 #include "base/memory/ref_counted.h" 13 #include "base/memory/ref_counted.h"
14 #include "base/memory/scoped_ptr.h" 14 #include "base/memory/scoped_ptr.h"
15 #include "base/message_loop/message_loop.h" 15 #include "base/message_loop/message_loop.h"
16 #include "content/browser/renderer_host/p2p/socket_host.h" 16 #include "content/browser/renderer_host/p2p/socket_host.h"
17 #include "content/common/content_export.h" 17 #include "content/common/content_export.h"
18 #include "content/common/p2p_socket_type.h" 18 #include "content/common/p2p_socket_type.h"
19 #include "net/base/ip_endpoint.h" 19 #include "net/base/ip_endpoint.h"
20 #include "net/udp/diff_serv_code_point.h" 20 #include "net/udp/diff_serv_code_point.h"
Stefan 2015/10/16 12:43:44 Merge -- not part of this CL.
21 #include "net/udp/udp_server_socket.h" 21 #include "net/udp/udp_server_socket.h"
22 #include "third_party/webrtc/base/asyncpacketsocket.h" 22 #include "third_party/webrtc/base/asyncpacketsocket.h"
23 23
24 namespace content { 24 namespace content {
25 25
26 class P2PMessageThrottler; 26 class P2PMessageThrottler;
27 27
28 class CONTENT_EXPORT P2PSocketHostUdp : public P2PSocketHost { 28 class CONTENT_EXPORT P2PSocketHostUdp : public P2PSocketHost {
29 public: 29 public:
30 P2PSocketHostUdp(IPC::Sender* message_sender, 30 P2PSocketHostUdp(IPC::Sender* message_sender,
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
64 64
65 void OnError(); 65 void OnError();
66 66
67 void SetSendBufferSize(); 67 void SetSendBufferSize();
68 68
69 void DoRead(); 69 void DoRead();
70 void OnRecv(int result); 70 void OnRecv(int result);
71 void HandleReadResult(int result); 71 void HandleReadResult(int result);
72 72
73 void DoSend(const PendingPacket& packet); 73 void DoSend(const PendingPacket& packet);
74 void OnSend(uint64 packet_id, uint64 tick_received, int result); 74 void OnSend(uint64_t packet_id,
75 void HandleSendResult(uint64 packet_id, uint64 tick_received, int result); 75 int32_t transport_sequence_number,
76 base::TimeTicks send_time,
77 int result);
78 void HandleSendResult(uint64_t packet_id,
79 int32_t transport_sequence_number,
80 base::TimeTicks send_time,
81 int result);
76 82
77 scoped_ptr<net::DatagramServerSocket> socket_; 83 scoped_ptr<net::DatagramServerSocket> socket_;
78 scoped_refptr<net::IOBuffer> recv_buffer_; 84 scoped_refptr<net::IOBuffer> recv_buffer_;
79 net::IPEndPoint recv_address_; 85 net::IPEndPoint recv_address_;
80 86
81 std::deque<PendingPacket> send_queue_; 87 std::deque<PendingPacket> send_queue_;
82 bool send_pending_; 88 bool send_pending_;
83 net::DiffServCodePoint last_dscp_; 89 net::DiffServCodePoint last_dscp_;
84 90
85 // Set of peer for which we have received STUN binding request or 91 // Set of peer for which we have received STUN binding request or
86 // response or relay allocation request or response. 92 // response or relay allocation request or response.
87 ConnectedPeerSet connected_peers_; 93 ConnectedPeerSet connected_peers_;
88 P2PMessageThrottler* throttler_; 94 P2PMessageThrottler* throttler_;
89 95
90 // Keep track of the send socket buffer size under experiment. 96 // Keep track of the send socket buffer size under experiment.
91 size_t send_buffer_size_; 97 size_t send_buffer_size_;
92 98
93 DISALLOW_COPY_AND_ASSIGN(P2PSocketHostUdp); 99 DISALLOW_COPY_AND_ASSIGN(P2PSocketHostUdp);
94 }; 100 };
95 101
96 } // namespace content 102 } // namespace content
97 103
98 #endif // CONTENT_BROWSER_RENDERER_HOST_P2P_SOCKET_HOST_UDP_H_ 104 #endif // CONTENT_BROWSER_RENDERER_HOST_P2P_SOCKET_HOST_UDP_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698