MCPcopy Create free account
hub / github.com/HaxeFoundation/hxcpp / block_error

Function block_error

src/hx/libs/std/Socket.cpp:130–148  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

128**/
129
130static void block_error()
131{
132
133#ifdef NEKO_WINDOWS
134 int err = WSAGetLastError();
135 // call ExitGCFreeZone after WSAGetLastError, WSAGetLastError is just an alias for GetLastError and
136 // calling ExitGCFreeZone will on some cases clear the lastError code.
137 hx::ExitGCFreeZone();
138 if( err == WSAEWOULDBLOCK || err == WSAEALREADY )
139
140#else
141 hx::ExitGCFreeZone();
142 if( errno == EAGAIN || errno == EWOULDBLOCK || errno == EINPROGRESS || errno == EALREADY )
143#endif
144 hx::Throw(HX_CSTRING("Blocking"));
145 else {
146 hx::Throw(HX_CSTRING("EOF"));
147 }
148}
149
150}
151

Callers 11

_hx_std_socket_send_charFunction · 0.70
_hx_std_socket_sendFunction · 0.70
_hx_std_socket_recvFunction · 0.70
_hx_std_socket_recv_charFunction · 0.70
_hx_std_socket_writeFunction · 0.70
_hx_std_socket_readFunction · 0.70
_hx_std_socket_connectFunction · 0.70
_hx_std_socket_acceptFunction · 0.70
_hx_std_socket_send_toFunction · 0.70
_hx_std_socket_recv_fromFunction · 0.70

Calls 2

ExitGCFreeZoneFunction · 0.85
ThrowFunction · 0.85

Tested by

no test coverage detected