| 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 #ifndef CHROME_BROWSER_EXTENSIONS_API_SOCKET_UDP_SOCKET_H_ | 5 #ifndef CHROME_BROWSER_EXTENSIONS_API_SOCKET_UDP_SOCKET_H_ |
| 6 #define CHROME_BROWSER_EXTENSIONS_API_SOCKET_UDP_SOCKET_H_ | 6 #define CHROME_BROWSER_EXTENSIONS_API_SOCKET_UDP_SOCKET_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| (...skipping 24 matching lines...) Expand all Loading... |
| 35 virtual bool GetPeerAddress(net::IPEndPoint* address) OVERRIDE; | 35 virtual bool GetPeerAddress(net::IPEndPoint* address) OVERRIDE; |
| 36 virtual bool GetLocalAddress(net::IPEndPoint* address) OVERRIDE; | 36 virtual bool GetLocalAddress(net::IPEndPoint* address) OVERRIDE; |
| 37 virtual Socket::SocketType GetSocketType() const OVERRIDE; | 37 virtual Socket::SocketType GetSocketType() const OVERRIDE; |
| 38 | 38 |
| 39 int JoinGroup(const std::string& address); | 39 int JoinGroup(const std::string& address); |
| 40 int LeaveGroup(const std::string& address); | 40 int LeaveGroup(const std::string& address); |
| 41 | 41 |
| 42 int SetMulticastTimeToLive(int ttl); | 42 int SetMulticastTimeToLive(int ttl); |
| 43 int SetMulticastLoopbackMode(bool loopback); | 43 int SetMulticastLoopbackMode(bool loopback); |
| 44 | 44 |
| 45 int AllowAddressReuse(); |
| 46 |
| 45 const std::vector<std::string>& GetJoinedGroups() const; | 47 const std::vector<std::string>& GetJoinedGroups() const; |
| 46 | 48 |
| 47 protected: | 49 protected: |
| 48 virtual int WriteImpl(net::IOBuffer* io_buffer, | 50 virtual int WriteImpl(net::IOBuffer* io_buffer, |
| 49 int io_buffer_size, | 51 int io_buffer_size, |
| 50 const net::CompletionCallback& callback) OVERRIDE; | 52 const net::CompletionCallback& callback) OVERRIDE; |
| 51 | 53 |
| 52 private: | 54 private: |
| 53 // Make net::IPEndPoint can be refcounted | 55 // Make net::IPEndPoint can be refcounted |
| 54 typedef base::RefCountedData<net::IPEndPoint> IPEndPoint; | 56 typedef base::RefCountedData<net::IPEndPoint> IPEndPoint; |
| (...skipping 12 matching lines...) Expand all Loading... |
| 67 RecvFromCompletionCallback recv_from_callback_; | 69 RecvFromCompletionCallback recv_from_callback_; |
| 68 | 70 |
| 69 CompletionCallback send_to_callback_; | 71 CompletionCallback send_to_callback_; |
| 70 | 72 |
| 71 std::vector<std::string> multicast_groups_; | 73 std::vector<std::string> multicast_groups_; |
| 72 }; | 74 }; |
| 73 | 75 |
| 74 } // namespace extensions | 76 } // namespace extensions |
| 75 | 77 |
| 76 #endif // CHROME_BROWSER_EXTENSIONS_API_SOCKET_UDP_SOCKET_H_ | 78 #endif // CHROME_BROWSER_EXTENSIONS_API_SOCKET_UDP_SOCKET_H_ |
| OLD | NEW |