socket.connect now implemented in the C core
This avoid socket.lua duplicating the iteration over the results of getaddrinfo(). Some problems with the C implementation not initializing sockets or the luasocket family have also been fixed, and error reporting made more robust.
This commit is contained in:
parent
3d3e69c6e4
commit
156669c28b
7 changed files with 69 additions and 48 deletions
|
@ -447,7 +447,7 @@ const char *socket_gaistrerror(int err) {
|
|||
case EAI_SERVICE: return "service not supported for socket type";
|
||||
case EAI_SOCKTYPE: return "ai_socktype not supported";
|
||||
case EAI_SYSTEM: return strerror(errno);
|
||||
default: return "unknown error";
|
||||
default: return gai_strerror(err);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue