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

Function fxReceive

xs/tools/xsl.c:1241–1265  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1239}
1240
1241void fxReceive(txMachine* the)
1242{
1243 int count;
1244 if (the->connection != mxNoSocket) {
1245#if mxWindows
1246 count = recv(the->connection, the->debugBuffer, sizeof(the->debugBuffer) - 1, 0);
1247 if (count < 0)
1248 fxDisconnect(the);
1249 else
1250 the->debugOffset = count;
1251#else
1252 again:
1253 count = read(the->connection, the->debugBuffer, sizeof(the->debugBuffer) - 1);
1254 if (count < 0) {
1255 if (errno == EINTR)
1256 goto again;
1257 else
1258 fxDisconnect(the);
1259 }
1260 else
1261 the->debugOffset = count;
1262#endif
1263 }
1264 the->debugBuffer[the->debugOffset] = 0;
1265}
1266
1267void fxSend(txMachine* the, txBoolean more)
1268{

Callers

nothing calls this directly

Calls 2

fxDisconnectFunction · 0.70
readFunction · 0.50

Tested by

no test coverage detected