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

Side by Side Diff: net/socket/datagram_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/quic/chromium/quic_stream_factory.cc ('k') | net/socket/fuzzed_datagram_client_socket.h » ('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_DATAGRAM_SOCKET_H_ 5 #ifndef NET_SOCKET_DATAGRAM_SOCKET_H_
6 #define NET_SOCKET_DATAGRAM_SOCKET_H_ 6 #define NET_SOCKET_DATAGRAM_SOCKET_H_
7 7
8 #include "net/base/net_export.h" 8 #include "net/base/net_export.h"
9 9
10 namespace net { 10 namespace net {
(...skipping 16 matching lines...) Expand all
27 // Close the socket. 27 // Close the socket.
28 virtual void Close() = 0; 28 virtual void Close() = 0;
29 29
30 // Copy the remote udp address into |address| and return a network error code. 30 // Copy the remote udp address into |address| and return a network error code.
31 virtual int GetPeerAddress(IPEndPoint* address) const = 0; 31 virtual int GetPeerAddress(IPEndPoint* address) const = 0;
32 32
33 // Copy the local udp address into |address| and return a network error code. 33 // Copy the local udp address into |address| and return a network error code.
34 // (similar to getsockname) 34 // (similar to getsockname)
35 virtual int GetLocalAddress(IPEndPoint* address) const = 0; 35 virtual int GetLocalAddress(IPEndPoint* address) const = 0;
36 36
37 // Switch to use non-blocking IO. Must be called right after construction and
38 // before other calls.
39 virtual void UseNonBlockingIO() = 0;
40
41 // Requests that packets sent by this socket not be fragment, either locally 37 // Requests that packets sent by this socket not be fragment, either locally
42 // by the host, or by routers (via the DF bit in the IPv4 packet header). 38 // by the host, or by routers (via the DF bit in the IPv4 packet header).
43 // May not be supported by all platforms. Returns a return a network error 39 // May not be supported by all platforms. Returns a return a network error
44 // code if there was a problem, but the socket will still be usable. Can not 40 // code if there was a problem, but the socket will still be usable. Can not
45 // return ERR_IO_PENDING. 41 // return ERR_IO_PENDING.
46 virtual int SetDoNotFragment() = 0; 42 virtual int SetDoNotFragment() = 0;
47 43
48 // Gets the NetLog for this socket. 44 // Gets the NetLog for this socket.
49 virtual const NetLogWithSource& NetLog() const = 0; 45 virtual const NetLogWithSource& NetLog() const = 0;
50 }; 46 };
51 47
52 } // namespace net 48 } // namespace net
53 49
54 #endif // NET_SOCKET_DATAGRAM_SOCKET_H_ 50 #endif // NET_SOCKET_DATAGRAM_SOCKET_H_
OLDNEW
« no previous file with comments | « net/quic/chromium/quic_stream_factory.cc ('k') | net/socket/fuzzed_datagram_client_socket.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698