()
| 517 | |
| 518 | private arrayBufferEffect: Effect.Effect<ArrayBuffer, Error.HttpServerError> | undefined |
| 519 | get arrayBuffer(): Effect.Effect<ArrayBuffer, Error.HttpServerError> { |
| 520 | if (this.arrayBufferEffect) { |
| 521 | return this.arrayBufferEffect |
| 522 | } |
| 523 | this.arrayBufferEffect = Effect.runSync(Effect.cached( |
| 524 | Effect.tryPromise({ |
| 525 | try: () => this.source.arrayBuffer(), |
| 526 | catch: (cause) => |
| 527 | new Error.HttpServerError({ |
| 528 | reason: new Error.RequestParseError({ |
| 529 | request: this, |
| 530 | cause |
| 531 | }) |
| 532 | }) |
| 533 | }) |
| 534 | )) |
| 535 | this.textEffect = Effect.map(this.arrayBufferEffect, (_) => new TextDecoder().decode(_)) |
| 536 | return this.arrayBufferEffect |
| 537 | } |
| 538 | |
| 539 | get upgrade(): Effect.Effect<Socket.Socket, Error.HttpServerError> { |
| 540 | return Effect.callback<Socket.Socket, Error.HttpServerError>((resume) => { |
no test coverage detected