MCPcopy Create free account
hub / github.com/GarageGames/Torque2D / getLastError

Function getLastError

engine/source/platform/platformNet.cpp:218–242  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

216 static ReservedSocketList<SOCKET> smReservedSocketList;
217
218 Net::Error getLastError()
219 {
220#if defined(TORQUE_USE_WINSOCK)
221 S32 err = WSAGetLastError();
222 switch (err)
223 {
224 case 0:
225 return Net::NoError;
226 case WSAEWOULDBLOCK:
227 return Net::WouldBlock;
228 default:
229 return Net::UnknownError;
230 }
231#else
232 int theError = errno;
233 if (errno == EAGAIN)
234 return Net::WouldBlock;
235 if (errno == 0)
236 return Net::NoError;
237 if (errno == EINPROGRESS)
238 return Net::WouldBlock;
239
240 return Net::UnknownError;
241#endif
242 }
243
244 S32 getDefaultGameProtocol()
245 {

Callers 15

getSocketAddressFunction · 0.85
openConnectToMethod · 0.85
openPortMethod · 0.85
sendtoMethod · 0.85
processMethod · 0.85
closeSocketMethod · 0.85
connectMethod · 0.85
listenMethod · 0.85
bindAddressMethod · 0.85
setBufferSizeMethod · 0.85
setBroadcastMethod · 0.85
setBlockingMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected