OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2016 The WebRTC project authors. All Rights Reserved. | 2 * Copyright 2016 The WebRTC project authors. All Rights Reserved. |
3 * | 3 * |
4 * Use of this source code is governed by a BSD-style license | 4 * Use of this source code is governed by a BSD-style license |
5 * that can be found in the LICENSE file in the root of the source | 5 * that can be found in the LICENSE file in the root of the source |
6 * tree. An additional intellectual property rights grant can be found | 6 * tree. An additional intellectual property rights grant can be found |
7 * in the file PATENTS. All contributing project authors may | 7 * in the file PATENTS. All contributing project authors may |
8 * be found in the AUTHORS file in the root of the source tree. | 8 * be found in the AUTHORS file in the root of the source tree. |
9 */ | 9 */ |
10 | 10 |
(...skipping 28 matching lines...) Expand all Loading... |
39 UdpTransport(const std::string& transport_name, | 39 UdpTransport(const std::string& transport_name, |
40 std::unique_ptr<rtc::AsyncPacketSocket> socket); | 40 std::unique_ptr<rtc::AsyncPacketSocket> socket); |
41 ~UdpTransport(); | 41 ~UdpTransport(); |
42 | 42 |
43 // Overrides of UdpTransportInterface, used by the API consumer. | 43 // Overrides of UdpTransportInterface, used by the API consumer. |
44 rtc::SocketAddress GetLocalAddress() const override; | 44 rtc::SocketAddress GetLocalAddress() const override; |
45 bool SetRemoteAddress(const rtc::SocketAddress& addr) override; | 45 bool SetRemoteAddress(const rtc::SocketAddress& addr) override; |
46 rtc::SocketAddress GetRemoteAddress() const override; | 46 rtc::SocketAddress GetRemoteAddress() const override; |
47 | 47 |
48 // Overrides of PacketTransportInterface, used by webrtc internally. | 48 // Overrides of PacketTransportInterface, used by webrtc internally. |
49 std::string debug_name() const override { return transport_name_; } | 49 const std::string debug_name() const override { return transport_name_; } |
50 | 50 |
51 bool receiving() const override { | 51 bool receiving() const override { |
52 // TODO(johan): Implement method and signal. | 52 // TODO(johan): Implement method and signal. |
53 return true; | 53 return true; |
54 } | 54 } |
55 | 55 |
56 bool writable() const override; | 56 bool writable() const override; |
57 | 57 |
58 int SendPacket(const char* data, | 58 int SendPacket(const char* data, |
59 size_t len, | 59 size_t len, |
(...skipping 16 matching lines...) Expand all Loading... |
76 std::string transport_name_; | 76 std::string transport_name_; |
77 int send_error_ = 0; | 77 int send_error_ = 0; |
78 std::unique_ptr<rtc::AsyncPacketSocket> socket_; | 78 std::unique_ptr<rtc::AsyncPacketSocket> socket_; |
79 // If not set, will be an "nil" address ("IsNil" returns true). | 79 // If not set, will be an "nil" address ("IsNil" returns true). |
80 rtc::SocketAddress remote_address_; | 80 rtc::SocketAddress remote_address_; |
81 rtc::ThreadChecker network_thread_checker_; | 81 rtc::ThreadChecker network_thread_checker_; |
82 }; | 82 }; |
83 } // namespace cricket | 83 } // namespace cricket |
84 | 84 |
85 #endif // WEBRTC_P2P_BASE_UDPTRANSPORT_H_ | 85 #endif // WEBRTC_P2P_BASE_UDPTRANSPORT_H_ |
OLD | NEW |