MCPcopy Create free account
hub / github.com/Tencent/UnLua / socket_strerror

Function socket_strerror

Plugins/UnLuaExtensions/LuaSocket/Source/src/usocket.cpp:411–425  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

409}
410
411const char *socket_strerror(int err) {
412 if (err <= 0) return io_strerror(err);
413 switch (err) {
414 case EADDRINUSE: return PIE_ADDRINUSE;
415 case EISCONN: return PIE_ISCONN;
416 case EACCES: return PIE_ACCESS;
417 case ECONNREFUSED: return PIE_CONNREFUSED;
418 case ECONNABORTED: return PIE_CONNABORTED;
419 case ECONNRESET: return PIE_CONNRESET;
420 case ETIMEDOUT: return PIE_TIMEDOUT;
421 default: {
422 return strerror(err);
423 }
424 }
425}
426
427const char *socket_ioerror(p_socket ps, int err) {
428 (void) ps;

Callers 15

inet_global_gethostnameFunction · 0.70
inet_meth_getpeernameFunction · 0.70
inet_meth_getsocknameFunction · 0.70
inet_trycreateFunction · 0.70
inet_trydisconnectFunction · 0.70
inet_tryconnectFunction · 0.70
inet_tryacceptFunction · 0.70
inet_trybindFunction · 0.70
socket_ioerrorFunction · 0.70
udp_strerrorFunction · 0.70
opt_get_errorFunction · 0.70
unixdgram_strerrorFunction · 0.70

Calls 1

io_strerrorFunction · 0.85

Tested by

no test coverage detected