(
entry: ClientRequestEntry,
write: (reply: FromServer<any>) => Effect.Effect<void>
)
| 1386 | const clientRespondDiscard = (_reply: Reply.Reply<any>) => Effect.void |
| 1387 | |
| 1388 | const makeClientRespond = ( |
| 1389 | entry: ClientRequestEntry, |
| 1390 | write: (reply: FromServer<any>) => Effect.Effect<void> |
| 1391 | ) => |
| 1392 | (reply: Reply.Reply<any>) => { |
| 1393 | switch (reply._tag) { |
| 1394 | case "Chunk": { |
| 1395 | entry.lastChunkId = reply.id |
| 1396 | return write({ |
| 1397 | _tag: "Chunk", |
| 1398 | clientId: 0, |
| 1399 | requestId: RequestId(reply.requestId), |
| 1400 | values: reply.values |
| 1401 | }) |
| 1402 | } |
| 1403 | case "WithExit": { |
| 1404 | clientRequests.delete(reply.requestId) |
| 1405 | return write({ |
| 1406 | _tag: "Exit", |
| 1407 | clientId: 0, |
| 1408 | requestId: RequestId(reply.requestId), |
| 1409 | exit: reply.exit |
| 1410 | }) |
| 1411 | } |
| 1412 | } |
| 1413 | } |
| 1414 | |
| 1415 | // --- Singletons --- |
| 1416 |
no test coverage detected