From 239241568d4d3ff14d2d1994e5829f3d548f2078 Mon Sep 17 00:00:00 2001 From: lloyd Date: Thu, 19 Jan 2012 17:07:03 +0000 Subject: Remove Handshake_Message::deserialize which was an unnecessary hook. Instead deserialize directly in the constructors that are passed the raw message data. This makes it easier to pass contextual information needed for decoding (eg, version numbers) where necessary. --- src/tls/c_hello.cpp | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'src/tls/c_hello.cpp') diff --git a/src/tls/c_hello.cpp b/src/tls/c_hello.cpp index 6c4964fb1..60f6de487 100644 --- a/src/tls/c_hello.cpp +++ b/src/tls/c_hello.cpp @@ -56,20 +56,20 @@ Hello_Request::Hello_Request(Record_Writer& writer) } /* -* Serialize a Hello Request message +* Deserialize a Hello Request message */ -MemoryVector Hello_Request::serialize() const +Hello_Request::Hello_Request(const MemoryRegion& buf) { - return MemoryVector(); + if(buf.size()) + throw Decoding_Error("Hello_Request: Must be empty, and is not"); } /* -* Deserialize a Hello Request message +* Serialize a Hello Request message */ -void Hello_Request::deserialize(const MemoryRegion& buf) +MemoryVector Hello_Request::serialize() const { - if(buf.size()) - throw Decoding_Error("Hello_Request: Must be empty, and is not"); + return MemoryVector(); } /* -- cgit v1.2.3