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

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

Issue 300683008: Land Recent QUIC Changes. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 6 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 | Annotate | Revision Log
« no previous file with comments | « net/tools/quic/quic_dispatcher_test.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 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
56 IPEndPoint* peer_address); 56 IPEndPoint* peer_address);
57 57
58 // Writes buf_len to the socket. If writing is successful, sets the result's 58 // Writes buf_len to the socket. If writing is successful, sets the result's
59 // status to WRITE_STATUS_OK and sets bytes_written. Otherwise sets the 59 // status to WRITE_STATUS_OK and sets bytes_written. Otherwise sets the
60 // result's status to WRITE_STATUS_BLOCKED or WRITE_STATUS_ERROR and sets 60 // result's status to WRITE_STATUS_BLOCKED or WRITE_STATUS_ERROR and sets
61 // error_code to errno. 61 // error_code to errno.
62 static WriteResult WritePacket(int fd, const char* buffer, size_t buf_len, 62 static WriteResult WritePacket(int fd, const char* buffer, size_t buf_len,
63 const IPAddressNumber& self_address, 63 const IPAddressNumber& self_address,
64 const IPEndPoint& peer_address); 64 const IPEndPoint& peer_address);
65 65
66 // A helper for WritePacket which fills in the cmsg with the supplied self
67 // address.
68 static void SetIpInfoInCmsg(const IPAddressNumber& self_address,
69 cmsghdr* cmsg);
70
66 private: 71 private:
67 DISALLOW_COPY_AND_ASSIGN(QuicSocketUtils); 72 DISALLOW_COPY_AND_ASSIGN(QuicSocketUtils);
68 }; 73 };
69 74
70 } // namespace tools 75 } // namespace tools
71 } // namespace net 76 } // namespace net
72 77
73 #endif // NET_TOOLS_QUIC_QUIC_SOCKET_UTILS_H_ 78 #endif // NET_TOOLS_QUIC_QUIC_SOCKET_UTILS_H_
OLDNEW
« no previous file with comments | « net/tools/quic/quic_dispatcher_test.cc ('k') | net/tools/quic/quic_socket_utils.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698