mirror of
https://github.com/sigmasternchen/Serwer
synced 2025-03-15 07:08:54 +00:00
21 lines
327 B
C
21 lines
327 B
C
#include "ws_error.h"
|
|
|
|
#include <string.h>
|
|
#include <netdb.h>
|
|
|
|
error_t ws_error = {
|
|
.type = WS,
|
|
.no = 0
|
|
};
|
|
|
|
const char* ws_strerror(void) {
|
|
if (ws_error.type == ERRNO || ws_error.no == EWS_SUC)
|
|
return strerror(ws_error.no);
|
|
|
|
if (ws_error.type == GAI)
|
|
return gai_strerror(ws_error.no);
|
|
|
|
// TODO
|
|
|
|
return "undefined";
|
|
}
|