Add global error handling

This commit is contained in:
2023-01-09 00:28:12 +01:00
parent 7f7a07c4d2
commit c36ad8c113
13 changed files with 181 additions and 105 deletions

@ -24,15 +24,8 @@ typedef struct {
SSL_CTX *ctx;
SSL *ssl;
long ts_start, ts_last, timeout_us;
long _last_ret;
int _errno;
unsigned long _ssl_error;
} sock;
int sock_enc_error(sock *s);
const char *sock_strerror(sock *s);
int sock_set_socket_timeout_micros(sock *s, long recv_micros, long send_micros);
int sock_set_socket_timeout(sock *s, double sec);