| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright 2011 The WebRTC Project Authors. All rights reserved. | 2 * Copyright 2011 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 |
| 11 #ifndef WEBRTC_EXAMPLES_PEERCONNECTION_CLIENT_PEER_CONNECTION_CLIENT_H_ | 11 #ifndef WEBRTC_EXAMPLES_PEERCONNECTION_CLIENT_PEER_CONNECTION_CLIENT_H_ |
| 12 #define WEBRTC_EXAMPLES_PEERCONNECTION_CLIENT_PEER_CONNECTION_CLIENT_H_ | 12 #define WEBRTC_EXAMPLES_PEERCONNECTION_CLIENT_PEER_CONNECTION_CLIENT_H_ |
| 13 #pragma once | 13 #pragma once |
| 14 | 14 |
| 15 #include <map> | 15 #include <map> |
| 16 #include <memory> |
| 16 #include <string> | 17 #include <string> |
| 17 | 18 |
| 18 #include "webrtc/base/nethelpers.h" | 19 #include "webrtc/base/nethelpers.h" |
| 19 #include "webrtc/base/physicalsocketserver.h" | 20 #include "webrtc/base/physicalsocketserver.h" |
| 20 #include "webrtc/base/scoped_ptr.h" | 21 #include "webrtc/base/scoped_ptr.h" |
| 21 #include "webrtc/base/signalthread.h" | 22 #include "webrtc/base/signalthread.h" |
| 22 #include "webrtc/base/sigslot.h" | 23 #include "webrtc/base/sigslot.h" |
| 23 | 24 |
| 24 typedef std::map<int, std::string> Peers; | 25 typedef std::map<int, std::string> Peers; |
| 25 | 26 |
| (...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 102 bool ParseServerResponse(const std::string& response, size_t content_length, | 103 bool ParseServerResponse(const std::string& response, size_t content_length, |
| 103 size_t* peer_id, size_t* eoh); | 104 size_t* peer_id, size_t* eoh); |
| 104 | 105 |
| 105 void OnClose(rtc::AsyncSocket* socket, int err); | 106 void OnClose(rtc::AsyncSocket* socket, int err); |
| 106 | 107 |
| 107 void OnResolveResult(rtc::AsyncResolverInterface* resolver); | 108 void OnResolveResult(rtc::AsyncResolverInterface* resolver); |
| 108 | 109 |
| 109 PeerConnectionClientObserver* callback_; | 110 PeerConnectionClientObserver* callback_; |
| 110 rtc::SocketAddress server_address_; | 111 rtc::SocketAddress server_address_; |
| 111 rtc::AsyncResolver* resolver_; | 112 rtc::AsyncResolver* resolver_; |
| 112 rtc::scoped_ptr<rtc::AsyncSocket> control_socket_; | 113 std::unique_ptr<rtc::AsyncSocket> control_socket_; |
| 113 rtc::scoped_ptr<rtc::AsyncSocket> hanging_get_; | 114 std::unique_ptr<rtc::AsyncSocket> hanging_get_; |
| 114 std::string onconnect_data_; | 115 std::string onconnect_data_; |
| 115 std::string control_data_; | 116 std::string control_data_; |
| 116 std::string notification_data_; | 117 std::string notification_data_; |
| 117 std::string client_name_; | 118 std::string client_name_; |
| 118 Peers peers_; | 119 Peers peers_; |
| 119 State state_; | 120 State state_; |
| 120 int my_id_; | 121 int my_id_; |
| 121 }; | 122 }; |
| 122 | 123 |
| 123 #endif // WEBRTC_EXAMPLES_PEERCONNECTION_CLIENT_PEER_CONNECTION_CLIENT_H_ | 124 #endif // WEBRTC_EXAMPLES_PEERCONNECTION_CLIENT_PEER_CONNECTION_CLIENT_H_ |
| OLD | NEW |