Skip to content

2个 C API的问题 #192

Closed Answered by iyangsj
stopandjoin asked this question in Q&A (问题和回答)
Mar 22, 2024 · 2 comments · 1 reply
Discussion options

You must be logged in to vote
  1. 客户端发起的流ID需使用偶数。其中双向流使用0/4/8/..., 单向流使用2/6/10/...
  1. 服务端在向流写入时,取决于写入数据大小,可能仅写入成功部分数据。
    剩余数据应在on_stream_writable回调中继续写入。

返回值为-5,代表StreamStateError,可能由于客户端创建的并非双向流
https://github.com/Tencent/tquic/blob/develop/src/error.rs#L192C20-L192C36

Replies: 2 comments 1 reply

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
1 reply
@iyangsj
Comment options

Answer selected by stopandjoin
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants