mirror of
https://gitea.invidious.io/iv-org/lsquic.cr
synced 2024-08-15 00:43:31 +00:00
Use buffered write
This commit is contained in:
parent
31403055e7
commit
50041fa046
1 changed files with 2 additions and 2 deletions
|
@ -13,8 +13,8 @@ module QUIC
|
||||||
class Client
|
class Client
|
||||||
STREAM_READF = ->(stream_if_ctx : Void*, buf : UInt8*, buf_len : LibC::SizeT, fin : LibC::Int) do
|
STREAM_READF = ->(stream_if_ctx : Void*, buf : UInt8*, buf_len : LibC::SizeT, fin : LibC::Int) do
|
||||||
stream_ctx = Box(StreamCtx).unbox(stream_if_ctx)
|
stream_ctx = Box(StreamCtx).unbox(stream_if_ctx)
|
||||||
bytes_read = stream_ctx.io.unbuffered_write Slice.new(buf, buf_len)
|
stream_ctx.io.write Slice.new(buf, buf_len)
|
||||||
bytes_read.to_u64
|
buf_len
|
||||||
end
|
end
|
||||||
|
|
||||||
ON_NEW_STREAM = ->(stream_if_ctx : Void*, s : LibLsquic::StreamT) do
|
ON_NEW_STREAM = ->(stream_if_ctx : Void*, s : LibLsquic::StreamT) do
|
||||||
|
|
Loading…
Reference in a new issue