Enum socks5_protocol::Version [−][src]
pub enum Version { V5, }
Expand description
Version conatins one byte. In socks5, it should be 5
, other value will return Error::InvalidVersion
.
use std::io::Cursor; use socks5_protocol::Version; #[tokio::main] async fn main() { let mut buf = Cursor::new([5u8]); let version = Version::read(&mut buf).await.unwrap(); assert_eq!(version, Version::V5); }
Variants
Expand description
SOCKS Version 5