Skip to content

Commit

Permalink
chore: more experiment
Browse files Browse the repository at this point in the history
  • Loading branch information
wemeetagain committed Oct 14, 2024
1 parent 000d743 commit 00820ec
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/stream.ts
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ export class QuicStream implements Stream {
while (true) {
this.log.trace('', this.id, 'reading')
const chunk = Buffer.allocUnsafe(CHUNK_SIZE)
const length = await this.#stream.read5(chunk)
const length = await this.#stream.read(chunk)
if (length == null) {
this.log.trace('', this.id, 'no more data')
break
Expand All @@ -125,7 +125,7 @@ export class QuicStream implements Stream {
for await (const chunk of source) {
const data = chunk instanceof Uint8ArrayList ? chunk.subarray() : chunk
this.log.trace('', this.id, 'writing', data.length, 'bytes')
await this.#stream.write4(data)
await this.#stream.write(data)
this.log.trace('', this.id, 'wrote', data.length, 'bytes')
}
} catch (e) {
Expand Down

0 comments on commit 00820ec

Please sign in to comment.