diff options
Diffstat (limited to 'src/tls/next_protocol.cpp')
-rw-r--r-- | src/tls/next_protocol.cpp | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/src/tls/next_protocol.cpp b/src/tls/next_protocol.cpp index 2d2e2e599..a0d4278f1 100644 --- a/src/tls/next_protocol.cpp +++ b/src/tls/next_protocol.cpp @@ -19,6 +19,15 @@ Next_Protocol::Next_Protocol(Record_Writer& writer, send(writer, hash); } +Next_Protocol::Next_Protocol(const MemoryRegion<byte>& buf) + { + TLS_Data_Reader reader(buf); + + m_protocol = reader.get_string(1, 0, 255); + + reader.get_range_vector<byte>(1, 0, 255); // padding, ignored + } + MemoryVector<byte> Next_Protocol::serialize() const { MemoryVector<byte> buf; @@ -38,13 +47,4 @@ MemoryVector<byte> Next_Protocol::serialize() const return buf; } -void Next_Protocol::deserialize(const MemoryRegion<byte>& buf) - { - TLS_Data_Reader reader(buf); - - m_protocol = reader.get_string(1, 0, 255); - - reader.get_range_vector<byte>(1, 0, 255); // padding, ignored - } - } |