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

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

Issue 309013006: Add quic_types.h and move the typedefs unrelated to the QUIC protocol (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
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>
11 #include <sys/socket.h> 11 #include <sys/socket.h>
12 #include <string> 12 #include <string>
13 13
14 #include "base/basictypes.h"
14 #include "net/base/ip_endpoint.h" 15 #include "net/base/ip_endpoint.h"
15 #include "net/quic/quic_protocol.h" 16 #include "net/quic/quic_types.h"
16 17
17 namespace net { 18 namespace net {
18 namespace tools { 19 namespace tools {
19 20
20 class QuicSocketUtils { 21 class QuicSocketUtils {
21 public: 22 public:
22 // If the msghdr contains IP_PKTINFO or IPV6_PKTINFO, this will return the 23 // If the msghdr contains IP_PKTINFO or IPV6_PKTINFO, this will return the
23 // IPAddressNumber in that header. Returns an uninitialized IPAddress on 24 // IPAddressNumber in that header. Returns an uninitialized IPAddress on
24 // failure. 25 // failure.
25 static IPAddressNumber GetAddressFromMsghdr(struct msghdr *hdr); 26 static IPAddressNumber GetAddressFromMsghdr(struct msghdr *hdr);
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
69 cmsghdr* cmsg); 70 cmsghdr* cmsg);
70 71
71 private: 72 private:
72 DISALLOW_COPY_AND_ASSIGN(QuicSocketUtils); 73 DISALLOW_COPY_AND_ASSIGN(QuicSocketUtils);
73 }; 74 };
74 75
75 } // namespace tools 76 } // namespace tools
76 } // namespace net 77 } // namespace net
77 78
78 #endif // NET_TOOLS_QUIC_QUIC_SOCKET_UTILS_H_ 79 #endif // NET_TOOLS_QUIC_QUIC_SOCKET_UTILS_H_
OLDNEW
« no previous file with comments | « net/tools/quic/quic_packet_writer_wrapper.cc ('k') | net/tools/quic/test_tools/quic_test_client.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698