Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(58)

Side by Side Diff: chrome/browser/extensions/api/socket/udp_socket.h

Issue 15039012: Add the ability to use AllowAddressReuse for UDP sockets. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Merge with master Created 7 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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
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_
OLDNEW
« no previous file with comments | « chrome/browser/extensions/api/socket/socket_api.cc ('k') | chrome/browser/extensions/api/socket/udp_socket.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698