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

Function fxReceive

xs/platforms/win_xs.c:236–257  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

234}
235
236void fxReceive(txMachine* the)
237{
238 if (the->connection != INVALID_SOCKET) {
239 again:
240 if (0 == sizeof(the->debugBuffer) - the->debugOffset - 1)
241 return;
242
243 int count = recv(the->connection, the->debugBuffer + the->debugOffset, sizeof(the->debugBuffer) - the->debugOffset - 1, 0);
244 if (count <= 0) {
245 if (WSAEWOULDBLOCK == WSAGetLastError()) {
246 if (the->debugOffset == 0)
247 goto again;
248 }
249 else
250 fxDisconnect(the);
251 }
252 else {
253 the->debugOffset += count;
254 }
255 the->debugBuffer[the->debugOffset] = 0;
256 }
257}
258
259void fxSend(txMachine* the, txBoolean more)
260{

Callers

nothing calls this directly

Calls 1

fxDisconnectFunction · 0.70

Tested by

no test coverage detected