OLD | NEW |
---|---|
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 NET_UDP_UDP_SOCKET_WIN_H_ | 5 #ifndef NET_UDP_UDP_SOCKET_WIN_H_ |
6 #define NET_UDP_UDP_SOCKET_WIN_H_ | 6 #define NET_UDP_UDP_SOCKET_WIN_H_ |
7 | 7 |
8 #include <qos2.h> | 8 #include <qos2.h> |
9 #include <stdint.h> | 9 #include <stdint.h> |
10 #include <winsock2.h> | 10 #include <winsock2.h> |
(...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
117 const CompletionCallback& callback); | 117 const CompletionCallback& callback); |
118 | 118 |
119 // Sets the receive buffer size (in bytes) for the socket. | 119 // Sets the receive buffer size (in bytes) for the socket. |
120 // Returns a net error code. | 120 // Returns a net error code. |
121 int SetReceiveBufferSize(int32_t size); | 121 int SetReceiveBufferSize(int32_t size); |
122 | 122 |
123 // Sets the send buffer size (in bytes) for the socket. | 123 // Sets the send buffer size (in bytes) for the socket. |
124 // Returns a net error code. | 124 // Returns a net error code. |
125 int SetSendBufferSize(int32_t size); | 125 int SetSendBufferSize(int32_t size); |
126 | 126 |
127 // Configures the socket to set or clear the DF (Do not Fragment) bit on | |
128 // packets, which prevents routers from fragmenting them. | |
mmenke
2016/08/12 19:46:06
Does this not "for IPv6, it prevents hosts from fr
Ryan Hamilton
2016/08/12 21:46:02
Missed this. Done.
| |
129 int SetDoNotFragment(); | |
130 | |
127 // Returns true if the socket is already connected or bound. | 131 // Returns true if the socket is already connected or bound. |
128 bool is_connected() const { return is_connected_; } | 132 bool is_connected() const { return is_connected_; } |
129 | 133 |
130 const BoundNetLog& NetLog() const { return net_log_; } | 134 const BoundNetLog& NetLog() const { return net_log_; } |
131 | 135 |
132 // Sets corresponding flags in |socket_options_| to allow the socket | 136 // Sets corresponding flags in |socket_options_| to allow the socket |
133 // to share the local address to which the socket will be bound with | 137 // to share the local address to which the socket will be bound with |
134 // other processes. Should be called between Open() and Bind(). | 138 // other processes. Should be called between Open() and Bind(). |
135 // Returns a net error code. | 139 // Returns a net error code. |
136 int AllowAddressReuse(); | 140 int AllowAddressReuse(); |
(...skipping 235 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
372 SetFlowFn set_flow_func_; | 376 SetFlowFn set_flow_func_; |
373 | 377 |
374 FRIEND_TEST_ALL_PREFIXES(UDPSocketTest, SetDSCPFake); | 378 FRIEND_TEST_ALL_PREFIXES(UDPSocketTest, SetDSCPFake); |
375 DISALLOW_COPY_AND_ASSIGN(QwaveAPI); | 379 DISALLOW_COPY_AND_ASSIGN(QwaveAPI); |
376 }; | 380 }; |
377 | 381 |
378 | 382 |
379 } // namespace net | 383 } // namespace net |
380 | 384 |
381 #endif // NET_UDP_UDP_SOCKET_WIN_H_ | 385 #endif // NET_UDP_UDP_SOCKET_WIN_H_ |
OLD | NEW |