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

Function fxReceive

xs/tools/xst.c:1348–1372  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1346}
1347
1348void fxReceive(txMachine* the)
1349{
1350 int count;
1351 if (the->connection != mxNoSocket) {
1352#if mxWindows
1353 count = recv(the->connection, the->debugBuffer, sizeof(the->debugBuffer) - 1, 0);
1354 if (count < 0)
1355 fxDisconnect(the);
1356 else
1357 the->debugOffset = count;
1358#else
1359 again:
1360 count = read(the->connection, the->debugBuffer, sizeof(the->debugBuffer) - 1);
1361 if (count < 0) {
1362 if (errno == EINTR)
1363 goto again;
1364 else
1365 fxDisconnect(the);
1366 }
1367 else
1368 the->debugOffset = count;
1369#endif
1370 }
1371 the->debugBuffer[the->debugOffset] = 0;
1372}
1373
1374void fxSend(txMachine* the, txBoolean more)
1375{

Callers

nothing calls this directly

Calls 2

fxDisconnectFunction · 0.70
readFunction · 0.50

Tested by

no test coverage detected