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

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

Issue 2253753002: Always use NonBlocking IO for UDP sockets on Windows. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 3 years, 8 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
« no previous file with comments | « net/socket/socket_test_util.cc ('k') | net/socket/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 24 matching lines...) Expand all
35 NetworkChangeNotifier::NetworkHandle GetBoundNetwork() const override; 35 NetworkChangeNotifier::NetworkHandle GetBoundNetwork() const override;
36 int Read(IOBuffer* buf, 36 int Read(IOBuffer* buf,
37 int buf_len, 37 int buf_len,
38 const CompletionCallback& callback) override; 38 const CompletionCallback& callback) override;
39 int Write(IOBuffer* buf, 39 int Write(IOBuffer* buf,
40 int buf_len, 40 int buf_len,
41 const CompletionCallback& callback) override; 41 const CompletionCallback& callback) override;
42 void Close() override; 42 void Close() override;
43 int GetPeerAddress(IPEndPoint* address) const override; 43 int GetPeerAddress(IPEndPoint* address) const override;
44 int GetLocalAddress(IPEndPoint* address) const override; 44 int GetLocalAddress(IPEndPoint* address) const override;
45 void UseNonBlockingIO() override;
46 int SetReceiveBufferSize(int32_t size) override; 45 int SetReceiveBufferSize(int32_t size) override;
47 int SetSendBufferSize(int32_t size) override; 46 int SetSendBufferSize(int32_t size) override;
48 int SetDoNotFragment() override; 47 int SetDoNotFragment() override;
49 const NetLogWithSource& NetLog() const override; 48 const NetLogWithSource& NetLog() const override;
50 49
51 // Switch to use non-blocking IO. Must be called right after construction and 50 // Switch to use non-blocking IO. Must be called right after construction and
52 // before other calls. 51 // before other calls.
53 private: 52 private:
54 UDPSocket socket_; 53 UDPSocket socket_;
55 NetworkChangeNotifier::NetworkHandle network_; 54 NetworkChangeNotifier::NetworkHandle network_;
56 DISALLOW_COPY_AND_ASSIGN(UDPClientSocket); 55 DISALLOW_COPY_AND_ASSIGN(UDPClientSocket);
57 }; 56 };
58 57
59 } // namespace net 58 } // namespace net
60 59
61 #endif // NET_SOCKET_UDP_CLIENT_SOCKET_H_ 60 #endif // NET_SOCKET_UDP_CLIENT_SOCKET_H_
OLDNEW
« no previous file with comments | « net/socket/socket_test_util.cc ('k') | net/socket/udp_client_socket.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698