MCPcopy Create free account
hub / github.com/defold/defold / socket_strerror

Function socket_strerror

engine/script/src/luasocket/wsocket.c:341–353  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

339}
340
341const char *socket_strerror(int err) {
342 if (err <= 0) return io_strerror(err);
343 switch (err) {
344 case WSAEADDRINUSE: return "address already in use";
345 case WSAECONNREFUSED: return "connection refused";
346 case WSAEISCONN: return "already connected";
347 case WSAEACCES: return "permission denied";
348 case WSAECONNABORTED: return "closed";
349 case WSAECONNRESET: return "closed";
350 case WSAETIMEDOUT: return "timeout";
351 default: return wstrerror(err);
352 }
353}
354
355const char *socket_ioerror(p_socket ps, int err) {
356 (void) ps;

Callers 15

opt_get_errorFunction · 0.70
socket_ioerrorFunction · 0.70
meth_listenFunction · 0.70
tryconnect6Function · 0.70
meth_acceptFunction · 0.70
unix_trybindFunction · 0.70
unix_tryconnectFunction · 0.70
meth_listenFunction · 0.70
global_createFunction · 0.70
inet_global_gethostnameFunction · 0.70
inet_meth_getpeernameFunction · 0.70
inet_meth_getsocknameFunction · 0.70

Calls 2

io_strerrorFunction · 0.85
wstrerrorFunction · 0.85

Tested by

no test coverage detected