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

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

Issue 1327923002: Migrates QUIC sessions to a new network when old network is (about to be) disconnected. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@home
Patch Set: Naming fixes. 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
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 "net/base/rand_callback.h" 10 #include "net/base/rand_callback.h"
(...skipping 10 matching lines...) Expand all
21 public: 21 public:
22 UDPClientSocket(DatagramSocket::BindType bind_type, 22 UDPClientSocket(DatagramSocket::BindType bind_type,
23 const RandIntCallback& rand_int_cb, 23 const RandIntCallback& rand_int_cb,
24 net::NetLog* net_log, 24 net::NetLog* net_log,
25 const net::NetLog::Source& source); 25 const net::NetLog::Source& source);
26 ~UDPClientSocket() override; 26 ~UDPClientSocket() override;
27 27
28 // DatagramClientSocket implementation. 28 // DatagramClientSocket implementation.
29 int BindToNetwork(NetworkChangeNotifier::NetworkHandle network) override; 29 int BindToNetwork(NetworkChangeNotifier::NetworkHandle network) override;
30 int BindToDefaultNetwork() override; 30 int BindToDefaultNetwork() override;
31 NetworkChangeNotifier::NetworkHandle GetBoundNetwork() override; 31 NetworkChangeNotifier::NetworkHandle GetBoundNetwork() const override;
32 int Connect(const IPEndPoint& address) override; 32 int Connect(const IPEndPoint& address) override;
33 int Read(IOBuffer* buf, 33 int Read(IOBuffer* buf,
34 int buf_len, 34 int buf_len,
35 const CompletionCallback& callback) override; 35 const CompletionCallback& callback) override;
36 int Write(IOBuffer* buf, 36 int Write(IOBuffer* buf,
37 int buf_len, 37 int buf_len,
38 const CompletionCallback& callback) override; 38 const CompletionCallback& callback) override;
39 void Close() override; 39 void Close() override;
40 int GetPeerAddress(IPEndPoint* address) const override; 40 int GetPeerAddress(IPEndPoint* address) const override;
41 int GetLocalAddress(IPEndPoint* address) const override; 41 int GetLocalAddress(IPEndPoint* address) const override;
42 int SetReceiveBufferSize(int32_t size) override; 42 int SetReceiveBufferSize(int32_t size) override;
43 int SetSendBufferSize(int32_t size) override; 43 int SetSendBufferSize(int32_t size) override;
44 const BoundNetLog& NetLog() const override; 44 const BoundNetLog& NetLog() const override;
45 45
46 #if defined(OS_WIN) 46 #if defined(OS_WIN)
47 // Switch to use non-blocking IO. Must be called right after construction and 47 // Switch to use non-blocking IO. Must be called right after construction and
48 // before other calls. 48 // before other calls.
49 void UseNonBlockingIO(); 49 void UseNonBlockingIO();
50 #endif 50 #endif
51 51
52 private: 52 private:
53 UDPSocket socket_; 53 UDPSocket socket_;
54 NetworkChangeNotifier::NetworkHandle network_; 54 NetworkChangeNotifier::NetworkHandle network_;
55 DISALLOW_COPY_AND_ASSIGN(UDPClientSocket); 55 DISALLOW_COPY_AND_ASSIGN(UDPClientSocket);
56 }; 56 };
57 57
58 } // namespace net 58 } // namespace net
59 59
60 #endif // NET_SOCKET_UDP_CLIENT_SOCKET_H_ 60 #endif // NET_SOCKET_UDP_CLIENT_SOCKET_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698