| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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/protocol/chromium_socket_factory.h" | 5 #include "remoting/protocol/chromium_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/scoped_ptr.h" | 9 #include "base/memory/scoped_ptr.h" |
| 10 #include "jingle/glue/utils.h" | 10 #include "jingle/glue/utils.h" |
| (...skipping 21 matching lines...) Expand all Loading... |
| 32 | 32 |
| 33 class UdpPacketSocket : public rtc::AsyncPacketSocket { | 33 class UdpPacketSocket : public rtc::AsyncPacketSocket { |
| 34 public: | 34 public: |
| 35 UdpPacketSocket(); | 35 UdpPacketSocket(); |
| 36 virtual ~UdpPacketSocket(); | 36 virtual ~UdpPacketSocket(); |
| 37 | 37 |
| 38 bool Init(const rtc::SocketAddress& local_address, | 38 bool Init(const rtc::SocketAddress& local_address, |
| 39 int min_port, int max_port); | 39 int min_port, int max_port); |
| 40 | 40 |
| 41 // rtc::AsyncPacketSocket interface. | 41 // rtc::AsyncPacketSocket interface. |
| 42 virtual rtc::SocketAddress GetLocalAddress() const OVERRIDE; | 42 virtual rtc::SocketAddress GetLocalAddress() const override; |
| 43 virtual rtc::SocketAddress GetRemoteAddress() const OVERRIDE; | 43 virtual rtc::SocketAddress GetRemoteAddress() const override; |
| 44 virtual int Send(const void* data, size_t data_size, | 44 virtual int Send(const void* data, size_t data_size, |
| 45 const rtc::PacketOptions& options) OVERRIDE; | 45 const rtc::PacketOptions& options) override; |
| 46 virtual int SendTo(const void* data, size_t data_size, | 46 virtual int SendTo(const void* data, size_t data_size, |
| 47 const rtc::SocketAddress& address, | 47 const rtc::SocketAddress& address, |
| 48 const rtc::PacketOptions& options) OVERRIDE; | 48 const rtc::PacketOptions& options) override; |
| 49 virtual int Close() OVERRIDE; | 49 virtual int Close() override; |
| 50 virtual State GetState() const OVERRIDE; | 50 virtual State GetState() const override; |
| 51 virtual int GetOption(rtc::Socket::Option option, int* value) OVERRIDE; | 51 virtual int GetOption(rtc::Socket::Option option, int* value) override; |
| 52 virtual int SetOption(rtc::Socket::Option option, int value) OVERRIDE; | 52 virtual int SetOption(rtc::Socket::Option option, int value) override; |
| 53 virtual int GetError() const OVERRIDE; | 53 virtual int GetError() const override; |
| 54 virtual void SetError(int error) OVERRIDE; | 54 virtual void SetError(int error) override; |
| 55 | 55 |
| 56 private: | 56 private: |
| 57 struct PendingPacket { | 57 struct PendingPacket { |
| 58 PendingPacket(const void* buffer, | 58 PendingPacket(const void* buffer, |
| 59 int buffer_size, | 59 int buffer_size, |
| 60 const net::IPEndPoint& address); | 60 const net::IPEndPoint& address); |
| 61 | 61 |
| 62 scoped_refptr<net::IOBufferWithSize> data; | 62 scoped_refptr<net::IOBufferWithSize> data; |
| 63 net::IPEndPoint address; | 63 net::IPEndPoint address; |
| 64 bool retried; | 64 bool retried; |
| (...skipping 323 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 388 return NULL; | 388 return NULL; |
| 389 } | 389 } |
| 390 | 390 |
| 391 rtc::AsyncResolverInterface* | 391 rtc::AsyncResolverInterface* |
| 392 ChromiumPacketSocketFactory::CreateAsyncResolver() { | 392 ChromiumPacketSocketFactory::CreateAsyncResolver() { |
| 393 return new rtc::AsyncResolver(); | 393 return new rtc::AsyncResolver(); |
| 394 } | 394 } |
| 395 | 395 |
| 396 } // namespace protocol | 396 } // namespace protocol |
| 397 } // namespace remoting | 397 } // namespace remoting |
| OLD | NEW |