pub fn write_request_header(
buf: &mut BytesMut,
hash_hex: &[u8],
command: u8,
address: &AddressRef<'_>,
) -> Result<(), WriteError>Expand description
Writes a Trojan request header to the buffer.
ยงErrors
InvalidHashLenif hash is not exactly 56 bytes.DomainTooLongif address contains a domain longer than 255 bytes.