mirror of
https://github.com/tribufu/rust-gamedig
synced 2026-06-01 09:42:41 +00:00
Added socket timeout capability and reduced PACKET_SIZE to 1400 as specified from protocol
This commit is contained in:
parent
d3b71fccf6
commit
caa7329a68
21 changed files with 125 additions and 49 deletions
|
|
@ -28,6 +28,10 @@ pub enum GDError {
|
|||
BadGame(String),
|
||||
/// Problems occurred while dns resolving.
|
||||
DnsResolve(String),
|
||||
/// Couldn't bind a socket.
|
||||
SocketBind(String),
|
||||
/// Invalid input.
|
||||
InvalidInput(String),
|
||||
}
|
||||
|
||||
impl fmt::Display for GDError {
|
||||
|
|
@ -42,6 +46,8 @@ impl fmt::Display for GDError {
|
|||
GDError::UnknownEnumCast => write!(f, "Unknown enum cast encountered."),
|
||||
GDError::BadGame(details) => write!(f, "Queried another game that the supposed one: {details}"),
|
||||
GDError::DnsResolve(details) => write!(f, "DNS Resolve: {details}"),
|
||||
GDError::SocketBind(details) => write!(f, "Socket bind: {details}"),
|
||||
GDError::InvalidInput(details) => write!(f, "Invalid input: {details}"),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue