diff options
Diffstat (limited to '')
| -rw-r--r-- | src/message/handshake/init.rs | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/src/message/handshake/init.rs b/src/message/handshake/init.rs index e4c0fa9..860df8a 100644 --- a/src/message/handshake/init.rs +++ b/src/message/handshake/init.rs @@ -37,7 +37,15 @@ impl Init { handshake |= 0x02; } - return handshake.serialize().unwrap(); + // Select Protocol 2: Datastream + + let mut init: Vec<u8> = vec![]; + + // Add handshake and protocol to our buffer + init.extend(handshake.serialize().unwrap()); + init.extend(crate::message::Protocol::Datastream.serialize()); + + return init; } pub fn parse(buf: &[u8]) -> Self { |
