OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 #include "remoting/client/plugin/pepper_packet_socket_factory.h" | 5 #include "remoting/client/plugin/pepper_packet_socket_factory.h" |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/logging.h" | 8 #include "base/logging.h" |
9 #include "base/memory/weak_ptr.h" | 9 #include "base/memory/weak_ptr.h" |
10 #include "net/base/io_buffer.h" | 10 #include "net/base/io_buffer.h" |
(...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
103 } | 103 } |
104 | 104 |
105 UdpPacketSocket::UdpPacketSocket(const pp::InstanceHandle& instance) | 105 UdpPacketSocket::UdpPacketSocket(const pp::InstanceHandle& instance) |
106 : socket_(instance), | 106 : socket_(instance), |
107 state_(STATE_CLOSED), | 107 state_(STATE_CLOSED), |
108 error_(0), | 108 error_(0), |
109 min_port_(0), | 109 min_port_(0), |
110 max_port_(0), | 110 max_port_(0), |
111 send_pending_(false), | 111 send_pending_(false), |
112 send_queue_size_(0), | 112 send_queue_size_(0), |
113 ALLOW_THIS_IN_INITIALIZER_LIST(weak_factory_(this)) { | 113 weak_factory_(this) { |
114 } | 114 } |
115 | 115 |
116 UdpPacketSocket::~UdpPacketSocket() { | 116 UdpPacketSocket::~UdpPacketSocket() { |
117 Close(); | 117 Close(); |
118 } | 118 } |
119 | 119 |
120 bool UdpPacketSocket::Init(const talk_base::SocketAddress& local_address, | 120 bool UdpPacketSocket::Init(const talk_base::SocketAddress& local_address, |
121 int min_port, | 121 int min_port, |
122 int max_port) { | 122 int max_port) { |
123 if (socket_.is_null()) { | 123 if (socket_.is_null()) { |
(...skipping 250 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
374 const talk_base::SocketAddress& remote_address, | 374 const talk_base::SocketAddress& remote_address, |
375 const talk_base::ProxyInfo& proxy_info, | 375 const talk_base::ProxyInfo& proxy_info, |
376 const std::string& user_agent, | 376 const std::string& user_agent, |
377 bool ssl) { | 377 bool ssl) { |
378 // We don't use TCP sockets for remoting connections. | 378 // We don't use TCP sockets for remoting connections. |
379 NOTREACHED(); | 379 NOTREACHED(); |
380 return NULL; | 380 return NULL; |
381 } | 381 } |
382 | 382 |
383 } // namespace remoting | 383 } // namespace remoting |
OLD | NEW |