mirror of
https://github.com/YGGverse/ggemini.git
synced 2026-03-31 17:15:31 +00:00
add tls_client_connection, rehandshake methods
This commit is contained in:
parent
c4c173f6cf
commit
b3e9bf239c
2 changed files with 37 additions and 6 deletions
|
|
@ -2,20 +2,24 @@ use std::fmt::{Display, Formatter, Result};
|
|||
|
||||
#[derive(Debug)]
|
||||
pub enum Error {
|
||||
SocketConnectionClosed,
|
||||
Rehandshake(glib::Error),
|
||||
SocketConnection(glib::Error),
|
||||
SocketConnectionClosed,
|
||||
TlsClientConnection(glib::Error),
|
||||
}
|
||||
|
||||
impl Display for Error {
|
||||
fn fmt(&self, f: &mut Formatter) -> Result {
|
||||
match self {
|
||||
Self::SocketConnectionClosed => write!(f, "Socket connection closed"),
|
||||
Self::SocketConnection(reason) => {
|
||||
write!(f, "Socket connection error: {reason}")
|
||||
Self::Rehandshake(e) => {
|
||||
write!(f, "Rehandshake error: {e}")
|
||||
}
|
||||
Self::TlsClientConnection(reason) => {
|
||||
write!(f, "TLS client connection error: {reason}")
|
||||
Self::SocketConnectionClosed => write!(f, "Socket connection closed"),
|
||||
Self::SocketConnection(e) => {
|
||||
write!(f, "Socket connection error: {e}")
|
||||
}
|
||||
Self::TlsClientConnection(e) => {
|
||||
write!(f, "TLS client connection error: {e}")
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue