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

Side by Side Diff: net/quic/quic_socket_address_coder.h

Issue 1535363003: Switch to standard integer types in net/. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: stddef Created 5 years 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/quic/quic_session_test.cc ('k') | net/quic/quic_socket_address_coder.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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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_QUIC_QUIC_SOCKET_ADDRESS_CODER_H_ 5 #ifndef NET_QUIC_QUIC_SOCKET_ADDRESS_CODER_H_
6 #define NET_QUIC_QUIC_SOCKET_ADDRESS_CODER_H_ 6 #define NET_QUIC_QUIC_SOCKET_ADDRESS_CODER_H_
7 7
8 #include <stddef.h>
9 #include <stdint.h>
10
8 #include <string> 11 #include <string>
9 12
10 #include "base/basictypes.h" 13 #include "base/macros.h"
11 #include "net/base/ip_endpoint.h" 14 #include "net/base/ip_endpoint.h"
12 #include "net/base/net_export.h" 15 #include "net/base/net_export.h"
13 16
14 namespace net { 17 namespace net {
15 18
16 // Serializes and parses a socket address (IP address and port), to be used in 19 // Serializes and parses a socket address (IP address and port), to be used in
17 // the kCADR tag in the ServerHello handshake message and the Public Reset 20 // the kCADR tag in the ServerHello handshake message and the Public Reset
18 // packet. 21 // packet.
19 class NET_EXPORT_PRIVATE QuicSocketAddressCoder { 22 class NET_EXPORT_PRIVATE QuicSocketAddressCoder {
20 public: 23 public:
21 QuicSocketAddressCoder(); 24 QuicSocketAddressCoder();
22 explicit QuicSocketAddressCoder(const IPEndPoint& address); 25 explicit QuicSocketAddressCoder(const IPEndPoint& address);
23 ~QuicSocketAddressCoder(); 26 ~QuicSocketAddressCoder();
24 27
25 std::string Encode() const; 28 std::string Encode() const;
26 29
27 bool Decode(const char* data, size_t length); 30 bool Decode(const char* data, size_t length);
28 31
29 IPAddressNumber ip() const { return address_.address(); } 32 IPAddressNumber ip() const { return address_.address(); }
30 33
31 uint16 port() const { return address_.port(); } 34 uint16_t port() const { return address_.port(); }
32 35
33 private: 36 private:
34 IPEndPoint address_; 37 IPEndPoint address_;
35 38
36 DISALLOW_COPY_AND_ASSIGN(QuicSocketAddressCoder); 39 DISALLOW_COPY_AND_ASSIGN(QuicSocketAddressCoder);
37 }; 40 };
38 41
39 } // namespace net 42 } // namespace net
40 43
41 #endif // NET_QUIC_QUIC_SOCKET_ADDRESS_CODER_H_ 44 #endif // NET_QUIC_QUIC_SOCKET_ADDRESS_CODER_H_
OLDNEW
« no previous file with comments | « net/quic/quic_session_test.cc ('k') | net/quic/quic_socket_address_coder.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698