| 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_TRANSPORT_TRANSPORT_UDP_TRANSPORT_H_ | 5 #ifndef MEDIA_CAST_NET_UDP_TRANSPORT_H_ |
| 6 #define MEDIA_CAST_TRANSPORT_TRANSPORT_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" |
| 11 #include "media/cast/cast_environment.h" | 11 #include "media/cast/cast_environment.h" |
| 12 #include "media/cast/transport/cast_transport_config.h" | 12 #include "media/cast/net/cast_transport_config.h" |
| 13 #include "media/cast/transport/cast_transport_sender.h" | 13 #include "media/cast/net/cast_transport_sender.h" |
| 14 #include "net/base/ip_endpoint.h" | 14 #include "net/base/ip_endpoint.h" |
| 15 #include "net/base/net_util.h" | 15 #include "net/base/net_util.h" |
| 16 #include "net/udp/udp_socket.h" | 16 #include "net/udp/udp_socket.h" |
| 17 | 17 |
| 18 namespace net { | 18 namespace net { |
| 19 class IOBuffer; | 19 class IOBuffer; |
| 20 class IPEndPoint; | 20 class IPEndPoint; |
| 21 class NetLog; | 21 class NetLog; |
| 22 } // namespace net | 22 } // namespace net |
| 23 | 23 |
| 24 namespace media { | 24 namespace media { |
| 25 namespace cast { | 25 namespace cast { |
| 26 namespace transport { | |
| 27 | 26 |
| 28 // This class implements UDP transport mechanism for Cast. | 27 // This class implements UDP transport mechanism for Cast. |
| 29 class UdpTransport : public PacketSender { | 28 class UdpTransport : public PacketSender { |
| 30 public: | 29 public: |
| 31 // Construct a UDP transport. | 30 // Construct a UDP transport. |
| 32 // All methods must be called on |io_thread_proxy|. | 31 // All methods must be called on |io_thread_proxy|. |
| 33 // |local_end_point| specifies the address and port to bind and listen | 32 // |local_end_point| specifies the address and port to bind and listen |
| 34 // to incoming packets. If the value is 0.0.0.0:0 then a bind is not | 33 // to incoming packets. If the value is 0.0.0.0:0 then a bind is not |
| 35 // performed. | 34 // performed. |
| 36 // |remote_end_point| specifies the address and port to send packets | 35 // |remote_end_point| specifies the address and port to send packets |
| (...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 83 net::IPEndPoint recv_addr_; | 82 net::IPEndPoint recv_addr_; |
| 84 PacketReceiverCallback packet_receiver_; | 83 PacketReceiverCallback packet_receiver_; |
| 85 const CastTransportStatusCallback status_callback_; | 84 const CastTransportStatusCallback status_callback_; |
| 86 | 85 |
| 87 // NOTE: Weak pointers must be invalidated before all other member variables. | 86 // NOTE: Weak pointers must be invalidated before all other member variables. |
| 88 base::WeakPtrFactory<UdpTransport> weak_factory_; | 87 base::WeakPtrFactory<UdpTransport> weak_factory_; |
| 89 | 88 |
| 90 DISALLOW_COPY_AND_ASSIGN(UdpTransport); | 89 DISALLOW_COPY_AND_ASSIGN(UdpTransport); |
| 91 }; | 90 }; |
| 92 | 91 |
| 93 } // namespace transport | |
| 94 } // namespace cast | 92 } // namespace cast |
| 95 } // namespace media | 93 } // namespace media |
| 96 | 94 |
| 97 #endif // MEDIA_CAST_TRANSPORT_TRANSPORT_UDP_TRANSPORT_H_ | 95 #endif // MEDIA_CAST_NET_UDP_TRANSPORT_H_ |
| OLD | NEW |