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

Side by Side Diff: net/tools/quic/quic_socket_utils.h

Issue 1752823002: n/a (QUIC toy client/server changes) (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@115400573
Patch Set: Revert to Patch Set 1 Created 4 years, 9 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/tools/quic/quic_server_bin.cc ('k') | net/tools/quic/quic_socket_utils.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) 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 // Some socket related helper methods for quic. 5 // Some socket related helper methods for quic.
6 6
7 #ifndef NET_TOOLS_QUIC_QUIC_SOCKET_UTILS_H_ 7 #ifndef NET_TOOLS_QUIC_QUIC_SOCKET_UTILS_H_
8 #define NET_TOOLS_QUIC_QUIC_SOCKET_UTILS_H_ 8 #define NET_TOOLS_QUIC_QUIC_SOCKET_UTILS_H_
9 9
10 #include <stddef.h> 10 #include <stddef.h>
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
65 const char* buffer, 65 const char* buffer,
66 size_t buf_len, 66 size_t buf_len,
67 const IPAddress& self_address, 67 const IPAddress& self_address,
68 const IPEndPoint& peer_address); 68 const IPEndPoint& peer_address);
69 69
70 // A helper for WritePacket which fills in the cmsg with the supplied self 70 // A helper for WritePacket which fills in the cmsg with the supplied self
71 // address. 71 // address.
72 // Returns the length of the packet info structure used. 72 // Returns the length of the packet info structure used.
73 static size_t SetIpInfoInCmsg(const IPAddress& self_address, cmsghdr* cmsg); 73 static size_t SetIpInfoInCmsg(const IPAddress& self_address, cmsghdr* cmsg);
74 74
75 // Creates a UDP socket and sets appropriate socket options for QUIC.
76 // Returns the created FD if successful, -1 otherwise.
77 // |overflow_supported| is set to true if the socket supports it.
78 static int CreateUDPSocket(const IPEndPoint& address,
79 bool* overflow_supported);
80
75 private: 81 private:
76 DISALLOW_COPY_AND_ASSIGN(QuicSocketUtils); 82 DISALLOW_COPY_AND_ASSIGN(QuicSocketUtils);
77 }; 83 };
78 84
79 } // namespace net 85 } // namespace net
80 86
81 #endif // NET_TOOLS_QUIC_QUIC_SOCKET_UTILS_H_ 87 #endif // NET_TOOLS_QUIC_QUIC_SOCKET_UTILS_H_
OLDNEW
« no previous file with comments | « net/tools/quic/quic_server_bin.cc ('k') | net/tools/quic/quic_socket_utils.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698