Minor fixes and error tolerance
This commit is contained in:
@@ -1,5 +1,3 @@
|
||||
use std::string;
|
||||
|
||||
pub struct HandShake<'a> {
|
||||
len_pack: u8,
|
||||
len_dom: u8,
|
||||
@@ -19,7 +17,7 @@ impl<'a> HandShake<'a>{
|
||||
}
|
||||
}
|
||||
|
||||
pub fn getHostName(&self) -> String {
|
||||
pub fn get_host_name(&self) -> String {
|
||||
String::from_utf8(self.datagram[5 .. ((self.len_dom+5) as usize)].to_vec()).unwrap()
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user