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

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

Issue 242293003: Added WriteResult::WriteResult method for internal use. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 8 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 | « no previous file | net/quic/quic_protocol.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 #ifndef NET_QUIC_QUIC_PROTOCOL_H_ 5 #ifndef NET_QUIC_QUIC_PROTOCOL_H_
6 #define NET_QUIC_QUIC_PROTOCOL_H_ 6 #define NET_QUIC_QUIC_PROTOCOL_H_
7 7
8 #include <stddef.h> 8 #include <stddef.h>
9 #include <limits> 9 #include <limits>
10 #include <map> 10 #include <map>
(...skipping 998 matching lines...) Expand 10 before | Expand all | Expand 10 after
1009 enum WriteStatus { 1009 enum WriteStatus {
1010 WRITE_STATUS_OK, 1010 WRITE_STATUS_OK,
1011 WRITE_STATUS_BLOCKED, 1011 WRITE_STATUS_BLOCKED,
1012 WRITE_STATUS_ERROR, 1012 WRITE_STATUS_ERROR,
1013 }; 1013 };
1014 1014
1015 // A struct used to return the result of write calls including either the number 1015 // A struct used to return the result of write calls including either the number
1016 // of bytes written or the error code, depending upon the status. 1016 // of bytes written or the error code, depending upon the status.
1017 struct NET_EXPORT_PRIVATE WriteResult { 1017 struct NET_EXPORT_PRIVATE WriteResult {
1018 WriteResult(WriteStatus status, int bytes_written_or_error_code); 1018 WriteResult(WriteStatus status, int bytes_written_or_error_code);
1019 WriteResult();
1019 1020
1020 WriteStatus status; 1021 WriteStatus status;
1021 union { 1022 union {
1022 int bytes_written; // only valid when status is OK 1023 int bytes_written; // only valid when status is OK
1023 int error_code; // only valid when status is ERROR 1024 int error_code; // only valid when status is ERROR
1024 }; 1025 };
1025 }; 1026 };
1026 1027
1027 } // namespace net 1028 } // namespace net
1028 1029
1029 #endif // NET_QUIC_QUIC_PROTOCOL_H_ 1030 #endif // NET_QUIC_QUIC_PROTOCOL_H_
OLDNEW
« no previous file with comments | « no previous file | net/quic/quic_protocol.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698