OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2009 The WebRTC Project Authors. All rights reserved. | 2 * Copyright 2009 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 159 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
170 } | 170 } |
171 } | 171 } |
172 | 172 |
173 void SetConnectionCount(size_t connection_count) { | 173 void SetConnectionCount(size_t connection_count) { |
174 size_t old_connection_count = connection_count_; | 174 size_t old_connection_count = connection_count_; |
175 connection_count_ = connection_count; | 175 connection_count_ = connection_count; |
176 if (connection_count_ < old_connection_count) | 176 if (connection_count_ < old_connection_count) |
177 SignalConnectionRemoved(this); | 177 SignalConnectionRemoved(this); |
178 } | 178 } |
179 | 179 |
| 180 void SetReceiving(bool receiving) { |
| 181 set_receiving(receiving); |
| 182 } |
| 183 |
180 virtual int SendPacket(const char* data, size_t len, | 184 virtual int SendPacket(const char* data, size_t len, |
181 const rtc::PacketOptions& options, int flags) { | 185 const rtc::PacketOptions& options, int flags) { |
182 if (state_ != STATE_CONNECTED) { | 186 if (state_ != STATE_CONNECTED) { |
183 return -1; | 187 return -1; |
184 } | 188 } |
185 | 189 |
186 if (flags != PF_SRTP_BYPASS && flags != 0) { | 190 if (flags != PF_SRTP_BYPASS && flags != 0) { |
187 return -1; | 191 return -1; |
188 } | 192 } |
189 | 193 |
(...skipping 309 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
499 } | 503 } |
500 } | 504 } |
501 | 505 |
502 private: | 506 private: |
503 bool fail_create_channel_; | 507 bool fail_create_channel_; |
504 }; | 508 }; |
505 | 509 |
506 } // namespace cricket | 510 } // namespace cricket |
507 | 511 |
508 #endif // WEBRTC_P2P_BASE_FAKESESSION_H_ | 512 #endif // WEBRTC_P2P_BASE_FAKESESSION_H_ |
OLD | NEW |