| 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 "net/base/io_buffer.h" | 9 #include "net/base/io_buffer.h" |
| 10 #include "net/base/net_errors.h" | 10 #include "net/base/net_errors.h" |
| 11 #include "ppapi/cpp/net_address.h" | 11 #include "ppapi/cpp/net_address.h" |
| 12 #include "ppapi/cpp/udp_socket.h" | 12 #include "ppapi/cpp/udp_socket.h" |
| 13 #include "ppapi/utility/completion_callback_factory.h" | 13 #include "ppapi/utility/completion_callback_factory.h" |
| 14 #include "remoting/client/plugin/pepper_address_resolver.h" |
| 14 #include "remoting/client/plugin/pepper_util.h" | 15 #include "remoting/client/plugin/pepper_util.h" |
| 15 #include "remoting/protocol/socket_util.h" | 16 #include "remoting/protocol/socket_util.h" |
| 16 #include "third_party/webrtc/base/asyncpacketsocket.h" | 17 #include "third_party/webrtc/base/asyncpacketsocket.h" |
| 18 #include "third_party/webrtc/base/nethelpers.h" |
| 17 | 19 |
| 18 namespace remoting { | 20 namespace remoting { |
| 19 | 21 |
| 20 namespace { | 22 namespace { |
| 21 | 23 |
| 22 // Size of the buffer to allocate for RecvFrom(). | 24 // Size of the buffer to allocate for RecvFrom(). |
| 23 const int kReceiveBufferSize = 65536; | 25 const int kReceiveBufferSize = 65536; |
| 24 | 26 |
| 25 // Maximum amount of data in the send buffers. This is necessary to | 27 // Maximum amount of data in the send buffers. This is necessary to |
| 26 // prevent out-of-memory crashes if the caller sends data faster than | 28 // prevent out-of-memory crashes if the caller sends data faster than |
| (...skipping 403 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 430 const rtc::ProxyInfo& proxy_info, | 432 const rtc::ProxyInfo& proxy_info, |
| 431 const std::string& user_agent, | 433 const std::string& user_agent, |
| 432 int opts) { | 434 int opts) { |
| 433 // We don't use TCP sockets for remoting connections. | 435 // We don't use TCP sockets for remoting connections. |
| 434 NOTREACHED(); | 436 NOTREACHED(); |
| 435 return NULL; | 437 return NULL; |
| 436 } | 438 } |
| 437 | 439 |
| 438 rtc::AsyncResolverInterface* | 440 rtc::AsyncResolverInterface* |
| 439 PepperPacketSocketFactory::CreateAsyncResolver() { | 441 PepperPacketSocketFactory::CreateAsyncResolver() { |
| 440 NOTREACHED(); | 442 return new PepperAddressResolver(pp_instance_); |
| 441 return NULL; | |
| 442 } | 443 } |
| 443 | 444 |
| 444 } // namespace remoting | 445 } // namespace remoting |
| OLD | NEW |