OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2004 The WebRTC Project Authors. All rights reserved. | 2 * Copyright 2004 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 314 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
325 // then we will signal the client. | 325 // then we will signal the client. |
326 void OnReadPacket(const char* data, size_t size, | 326 void OnReadPacket(const char* data, size_t size, |
327 const rtc::SocketAddress& addr, | 327 const rtc::SocketAddress& addr, |
328 ProtocolType proto); | 328 ProtocolType proto); |
329 | 329 |
330 // If the given data comprises a complete and correct STUN message then the | 330 // If the given data comprises a complete and correct STUN message then the |
331 // return value is true, otherwise false. If the message username corresponds | 331 // return value is true, otherwise false. If the message username corresponds |
332 // with this port's username fragment, msg will contain the parsed STUN | 332 // with this port's username fragment, msg will contain the parsed STUN |
333 // message. Otherwise, the function may send a STUN response internally. | 333 // message. Otherwise, the function may send a STUN response internally. |
334 // remote_username contains the remote fragment of the STUN username. | 334 // remote_username contains the remote fragment of the STUN username. |
335 bool GetStunMessage(const char* data, size_t size, | 335 bool GetStunMessage(const char* data, |
| 336 size_t size, |
336 const rtc::SocketAddress& addr, | 337 const rtc::SocketAddress& addr, |
337 IceMessage** out_msg, std::string* out_username); | 338 rtc::scoped_ptr<IceMessage>* out_msg, |
| 339 std::string* out_username); |
338 | 340 |
339 // Checks if the address in addr is compatible with the port's ip. | 341 // Checks if the address in addr is compatible with the port's ip. |
340 bool IsCompatibleAddress(const rtc::SocketAddress& addr); | 342 bool IsCompatibleAddress(const rtc::SocketAddress& addr); |
341 | 343 |
342 // Returns default DSCP value. | 344 // Returns default DSCP value. |
343 rtc::DiffServCodePoint DefaultDscpValue() const { | 345 rtc::DiffServCodePoint DefaultDscpValue() const { |
344 // No change from what MediaChannel set. | 346 // No change from what MediaChannel set. |
345 return rtc::DSCP_NO_CHANGE; | 347 return rtc::DSCP_NO_CHANGE; |
346 } | 348 } |
347 | 349 |
(...skipping 315 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
663 const rtc::PacketOptions& options) override; | 665 const rtc::PacketOptions& options) override; |
664 int GetError() override { return error_; } | 666 int GetError() override { return error_; } |
665 | 667 |
666 private: | 668 private: |
667 int error_ = 0; | 669 int error_ = 0; |
668 }; | 670 }; |
669 | 671 |
670 } // namespace cricket | 672 } // namespace cricket |
671 | 673 |
672 #endif // WEBRTC_P2P_BASE_PORT_H_ | 674 #endif // WEBRTC_P2P_BASE_PORT_H_ |
OLD | NEW |