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

Unified Diff: net/quic/crypto/crypto_framer.h

Issue 12381018: QUIC - Some sketching of the crypto handshake. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 7 years, 10 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « net/net.gyp ('k') | net/quic/crypto/crypto_framer.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/quic/crypto/crypto_framer.h
===================================================================
--- net/quic/crypto/crypto_framer.h (revision 184750)
+++ net/quic/crypto/crypto_framer.h (working copy)
@@ -42,6 +42,11 @@
virtual ~CryptoFramer();
+ // ParseMessage parses exactly one message from the given StringPiece. If
+ // there is an error, the message is truncated, or the message has trailing
+ // garbage then NULL will be returned.
+ static CryptoHandshakeMessage* ParseMessage(base::StringPiece in);
+
// Set callbacks to be called from the framer. A visitor must be set, or
// else the framer will crash. It is acceptable for the visitor to do
// nothing. If this is called multiple times, only the last visitor
@@ -66,7 +71,8 @@
// Returns a new QuicData owned by the caller that contains a serialized
// |message|, or NULL if there was an error.
- QuicData* ConstructHandshakeMessage(const CryptoHandshakeMessage& message);
+ static QuicData* ConstructHandshakeMessage(
+ const CryptoHandshakeMessage& message);
private:
// Clears per-message state. Does not clear the visitor.
« no previous file with comments | « net/net.gyp ('k') | net/quic/crypto/crypto_framer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698