| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 MEDIA_CAST_NET_UDP_TRANSPORT_H_ | 5 #ifndef MEDIA_CAST_NET_UDP_TRANSPORT_H_ |
| 6 #define MEDIA_CAST_NET_UDP_TRANSPORT_H_ | 6 #define MEDIA_CAST_NET_UDP_TRANSPORT_H_ |
| 7 | 7 |
| 8 #include "base/memory/ref_counted.h" | 8 #include "base/memory/ref_counted.h" |
| 9 #include "base/memory/scoped_ptr.h" | 9 #include "base/memory/scoped_ptr.h" |
| 10 #include "base/memory/weak_ptr.h" | 10 #include "base/memory/weak_ptr.h" |
| (...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 73 void ScheduleReceiveNextPacket(); | 73 void ScheduleReceiveNextPacket(); |
| 74 | 74 |
| 75 void OnSent(const scoped_refptr<net::IOBuffer>& buf, | 75 void OnSent(const scoped_refptr<net::IOBuffer>& buf, |
| 76 PacketRef packet, | 76 PacketRef packet, |
| 77 const base::Closure& cb, | 77 const base::Closure& cb, |
| 78 int result); | 78 int result); |
| 79 | 79 |
| 80 const scoped_refptr<base::SingleThreadTaskRunner> io_thread_proxy_; | 80 const scoped_refptr<base::SingleThreadTaskRunner> io_thread_proxy_; |
| 81 const net::IPEndPoint local_addr_; | 81 const net::IPEndPoint local_addr_; |
| 82 net::IPEndPoint remote_addr_; | 82 net::IPEndPoint remote_addr_; |
| 83 const scoped_ptr<net::UDPSocket> udp_socket_; | 83 scoped_ptr<net::UDPSocket> udp_socket_; |
| 84 bool send_pending_; | 84 bool send_pending_; |
| 85 bool receive_pending_; | 85 bool receive_pending_; |
| 86 bool client_connected_; | 86 bool client_connected_; |
| 87 net::DiffServCodePoint next_dscp_value_; | 87 net::DiffServCodePoint next_dscp_value_; |
| 88 scoped_ptr<Packet> next_packet_; | 88 scoped_ptr<Packet> next_packet_; |
| 89 scoped_refptr<net::WrappedIOBuffer> recv_buf_; | 89 scoped_refptr<net::WrappedIOBuffer> recv_buf_; |
| 90 net::IPEndPoint recv_addr_; | 90 net::IPEndPoint recv_addr_; |
| 91 PacketReceiverCallbackWithStatus packet_receiver_; | 91 PacketReceiverCallbackWithStatus packet_receiver_; |
| 92 int32 send_buffer_size_; | 92 int32 send_buffer_size_; |
| 93 const CastTransportStatusCallback status_callback_; | 93 const CastTransportStatusCallback status_callback_; |
| 94 int bytes_sent_; | 94 int bytes_sent_; |
| 95 | 95 |
| 96 // NOTE: Weak pointers must be invalidated before all other member variables. | 96 // NOTE: Weak pointers must be invalidated before all other member variables. |
| 97 base::WeakPtrFactory<UdpTransport> weak_factory_; | 97 base::WeakPtrFactory<UdpTransport> weak_factory_; |
| 98 | 98 |
| 99 DISALLOW_COPY_AND_ASSIGN(UdpTransport); | 99 DISALLOW_COPY_AND_ASSIGN(UdpTransport); |
| 100 }; | 100 }; |
| 101 | 101 |
| 102 } // namespace cast | 102 } // namespace cast |
| 103 } // namespace media | 103 } // namespace media |
| 104 | 104 |
| 105 #endif // MEDIA_CAST_NET_UDP_TRANSPORT_H_ | 105 #endif // MEDIA_CAST_NET_UDP_TRANSPORT_H_ |
| OLD | NEW |