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

Unified Diff: net/udp/udp_socket_posix.h

Issue 2235973002: Add a SetDoNotFragment() method to DatagramSocket, and call this for (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix mmenke's comments Created 4 years, 4 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 side-by-side diff with in-line comments
Download patch
Index: net/udp/udp_socket_posix.h
diff --git a/net/udp/udp_socket_posix.h b/net/udp/udp_socket_posix.h
index 305c435334ae0c4f27de4f29b72b66671a92207a..e0e57debc2cc88d81e637606993c28b5cfd5a2d0 100644
--- a/net/udp/udp_socket_posix.h
+++ b/net/udp/udp_socket_posix.h
@@ -119,6 +119,13 @@ class NET_EXPORT UDPSocketPosix : public base::NonThreadSafe {
// Returns a net error code.
int SetSendBufferSize(int32_t size);
+ // If supported by the platform, configures the socket to set the DF
+ // (Do not Fragment) bit on packets, which prevents routers from fragmenting
+ // them. Also, for IPv6, it prevents hosts from fragmenting them.
+ // Returns a return a network error code if there was a problem, but the
+ // socket will still be usable. Can not return ERR_IO_PENDING.
+ int SetDoNotFragment();
+
// Returns true if the socket is already connected or bound.
bool is_connected() const { return is_connected_; }

Powered by Google App Engine
This is Rietveld 408576698