refactor(c-libuv): Ajust Errno

This commit is contained in:
赵英杰
2024-07-25 15:40:02 +08:00
parent c27c654180
commit 65e1f261c0
4 changed files with 117 additions and 99 deletions

View File

@@ -80,6 +80,23 @@ const (
SOCK_SEQPACKET = 5 // sequenced packet stream
)
const (
EAI_ADDRFAMILY = iota + 1 /* address family for hostname not supported */
EAI_AGAIN /* temporary failure in name resolution */
EAI_BADFLAGS /* invalid value for ai_flags */
EAI_FAIL /* non-recoverable failure in name resolution */
EAI_FAMILY /* ai_family not supported */
EAI_MEMORY /* memory allocation failure */
EAI_NODATA /* no address associated with hostname */
EAI_NONAME /* hostname nor servname provided, or not known */
EAI_SERVICE /* servname not supported for ai_socktype */
EAI_SOCKTYPE /* ai_socktype not supported */
EAI_SYSTEM /* system error returned in errno */
EAI_BADHINTS /* invalid value for hints */
EAI_PROTOCOL /* resolved protocol is unknown */
EAI_OVERFLOW /* argument buffer overflow */
)
// (TODO) merge to inet
const INET_ADDRSTRLEN = 16