MCPcopy Create free account
hub / github.com/Moddable-OpenSource/moddable / socketDownUseCount

Function socketDownUseCount

modules/network/socket/lwip/modSocket.c:173–189  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

171}
172
173static int socketDownUseCount(xsMachine *the, xsSocket xss)
174{
175 xsDestructor destructor;
176
177 modCriticalSectionBegin();
178 int8 useCount = --xss->useCount;
179 if (useCount > 0) {
180 modCriticalSectionEnd();
181 return 0;
182 }
183
184 xss->pending |= kPendingClose;
185 modCriticalSectionEnd();
186 destructor = (kTCPListener == xss->kind) ? xs_listener_destructor : xs_socket_destructor;
187 (*destructor)(xss);
188 return 1;
189}
190
191void xs_socket(xsMachine *the)
192{

Callers 5

modSocket.cFile · 0.70
xs_socket_closeFunction · 0.70
didErrorFunction · 0.70
didConnectFunction · 0.70
socketClearPendingFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected