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

Side by Side Diff: net/udp/udp_client_socket.h

Issue 1541003003: Makes DatagramClientSocket::GetBoundNetwork const. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@quicreader
Patch Set: Created 5 years 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
« no previous file with comments | « net/udp/datagram_client_socket.h ('k') | net/udp/udp_client_socket.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 NET_SOCKET_UDP_CLIENT_SOCKET_H_ 5 #ifndef NET_SOCKET_UDP_CLIENT_SOCKET_H_
6 #define NET_SOCKET_UDP_CLIENT_SOCKET_H_ 6 #define NET_SOCKET_UDP_CLIENT_SOCKET_H_
7 7
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include "base/macros.h" 10 #include "base/macros.h"
(...skipping 11 matching lines...) Expand all
22 public: 22 public:
23 UDPClientSocket(DatagramSocket::BindType bind_type, 23 UDPClientSocket(DatagramSocket::BindType bind_type,
24 const RandIntCallback& rand_int_cb, 24 const RandIntCallback& rand_int_cb,
25 net::NetLog* net_log, 25 net::NetLog* net_log,
26 const net::NetLog::Source& source); 26 const net::NetLog::Source& source);
27 ~UDPClientSocket() override; 27 ~UDPClientSocket() override;
28 28
29 // DatagramClientSocket implementation. 29 // DatagramClientSocket implementation.
30 int BindToNetwork(NetworkChangeNotifier::NetworkHandle network) override; 30 int BindToNetwork(NetworkChangeNotifier::NetworkHandle network) override;
31 int BindToDefaultNetwork() override; 31 int BindToDefaultNetwork() override;
32 NetworkChangeNotifier::NetworkHandle GetBoundNetwork() override; 32 NetworkChangeNotifier::NetworkHandle GetBoundNetwork() const override;
33 int Connect(const IPEndPoint& address) override; 33 int Connect(const IPEndPoint& address) override;
34 int Read(IOBuffer* buf, 34 int Read(IOBuffer* buf,
35 int buf_len, 35 int buf_len,
36 const CompletionCallback& callback) override; 36 const CompletionCallback& callback) override;
37 int Write(IOBuffer* buf, 37 int Write(IOBuffer* buf,
38 int buf_len, 38 int buf_len,
39 const CompletionCallback& callback) override; 39 const CompletionCallback& callback) override;
40 void Close() override; 40 void Close() override;
41 int GetPeerAddress(IPEndPoint* address) const override; 41 int GetPeerAddress(IPEndPoint* address) const override;
42 int GetLocalAddress(IPEndPoint* address) const override; 42 int GetLocalAddress(IPEndPoint* address) const override;
43 int SetReceiveBufferSize(int32_t size) override; 43 int SetReceiveBufferSize(int32_t size) override;
44 int SetSendBufferSize(int32_t size) override; 44 int SetSendBufferSize(int32_t size) override;
45 const BoundNetLog& NetLog() const override; 45 const BoundNetLog& NetLog() const override;
46 46
47 #if defined(OS_WIN) 47 #if defined(OS_WIN)
48 // Switch to use non-blocking IO. Must be called right after construction and 48 // Switch to use non-blocking IO. Must be called right after construction and
49 // before other calls. 49 // before other calls.
50 void UseNonBlockingIO(); 50 void UseNonBlockingIO();
51 #endif 51 #endif
52 52
53 private: 53 private:
54 UDPSocket socket_; 54 UDPSocket socket_;
55 NetworkChangeNotifier::NetworkHandle network_; 55 NetworkChangeNotifier::NetworkHandle network_;
56 DISALLOW_COPY_AND_ASSIGN(UDPClientSocket); 56 DISALLOW_COPY_AND_ASSIGN(UDPClientSocket);
57 }; 57 };
58 58
59 } // namespace net 59 } // namespace net
60 60
61 #endif // NET_SOCKET_UDP_CLIENT_SOCKET_H_ 61 #endif // NET_SOCKET_UDP_CLIENT_SOCKET_H_
OLDNEW
« no previous file with comments | « net/udp/datagram_client_socket.h ('k') | net/udp/udp_client_socket.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698