Add Unix domain sockets for local IPC #37

Merged
apio merged 16 commits from unix-sockets into main 2023-07-30 09:49:38 +00:00
2 changed files with 8 additions and 0 deletions
Showing only changes of commit 6b0bc66fd2 - Show all commits

View File

@ -45,11 +45,15 @@
#define EOVERFLOW 75 // Value too large for defined data type
#define EILSEQ 84 // Invalid or incomplete multibyte or wide character
#define ENOTSOCK 88 // Socket operation on non-socket
#define EDESTADDRREQ 89 // Destination address required
#define EPROTOTYPE 91 // Protocol wrong type for socket
#define ENOTSUP 95 // Operation not supported
#define EOPNOTSUPP 95 // Operation not supported
#define EAFNOSUPPORT 97 // Address family not supported by protocol
#define EADDRINUSE 98 // Address already in use
#define ENETRESET 102 // Network dropped connection on reset
#define ECONNRESET 104 // Connection reset by peer
#define EISCONN 106 // Transport endpoint is already connected
#define ENOTCONN 107 // Transport endpoint is not connected
#define ETIMEDOUT 110 // Connection timed out
#define EALREADY 114 // Operation already in progress

View File

@ -56,6 +56,10 @@ const char* error_string(int error)
case EISCONN: return "Transport endpoint is already connected";
case ETIMEDOUT: return "Connection timed out";
case EALREADY: return "Operation already in progress";
case EDESTADDRREQ: return "Destination address required";
case EPROTOTYPE: return "Protocol wrong type for socket";
case EAFNOSUPPORT: return "Address family not supported by protocol";
case ENOTCONN: return "Transport endpoint is not connected";
default: return "Unknown error";
}
}