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_POSIX_H_ | 5 #ifndef NET_UDP_UDP_SOCKET_POSIX_H_ |
6 #define NET_UDP_UDP_SOCKET_POSIX_H_ | 6 #define NET_UDP_UDP_SOCKET_POSIX_H_ |
7 | 7 |
8 #include <stdint.h> | 8 #include <stdint.h> |
9 | 9 |
10 #include <memory> | 10 #include <memory> |
(...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
112 const CompletionCallback& callback); | 112 const CompletionCallback& callback); |
113 | 113 |
114 // Sets the receive buffer size (in bytes) for the socket. | 114 // Sets the receive buffer size (in bytes) for the socket. |
115 // Returns a net error code. | 115 // Returns a net error code. |
116 int SetReceiveBufferSize(int32_t size); | 116 int SetReceiveBufferSize(int32_t size); |
117 | 117 |
118 // Sets the send buffer size (in bytes) for the socket. | 118 // Sets the send buffer size (in bytes) for the socket. |
119 // Returns a net error code. | 119 // Returns a net error code. |
120 int SetSendBufferSize(int32_t size); | 120 int SetSendBufferSize(int32_t size); |
121 | 121 |
122 // Configures the socket to set or clear the DF (Do not Fragment) bit on | |
Jeremy Dorfman
2016/08/12 17:23:41
This can't clear the DF bit now. Also, for IPv6, i
Ryan Hamilton
2016/08/12 17:40:53
Done.
| |
123 // packets, which prevents routers from fragmenting them. | |
124 int SetDoNotFragment(); | |
125 | |
122 // Returns true if the socket is already connected or bound. | 126 // Returns true if the socket is already connected or bound. |
123 bool is_connected() const { return is_connected_; } | 127 bool is_connected() const { return is_connected_; } |
124 | 128 |
125 const BoundNetLog& NetLog() const { return net_log_; } | 129 const BoundNetLog& NetLog() const { return net_log_; } |
126 | 130 |
127 // Sets corresponding flags in |socket_options_| to allow the socket | 131 // Sets corresponding flags in |socket_options_| to allow the socket |
128 // to share the local address to which the socket will be bound with | 132 // to share the local address to which the socket will be bound with |
129 // other processes. Should be called between Open() and Bind(). | 133 // other processes. Should be called between Open() and Bind(). |
130 // Returns a net error code. | 134 // Returns a net error code. |
131 int AllowAddressReuse(); | 135 int AllowAddressReuse(); |
(...skipping 180 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
312 | 316 |
313 // Network that this socket is bound to via BindToNetwork(). | 317 // Network that this socket is bound to via BindToNetwork(). |
314 NetworkChangeNotifier::NetworkHandle bound_network_; | 318 NetworkChangeNotifier::NetworkHandle bound_network_; |
315 | 319 |
316 DISALLOW_COPY_AND_ASSIGN(UDPSocketPosix); | 320 DISALLOW_COPY_AND_ASSIGN(UDPSocketPosix); |
317 }; | 321 }; |
318 | 322 |
319 } // namespace net | 323 } // namespace net |
320 | 324 |
321 #endif // NET_UDP_UDP_SOCKET_POSIX_H_ | 325 #endif // NET_UDP_UDP_SOCKET_POSIX_H_ |
OLD | NEW |