valyala/fasthttp

how should convert bytesBuffer into http message object。

オープン

#763 opened on 2020/03/13

 (3 件のコメント) (0 件のリアクション) (0 人の担当者)Go (1,755 件のフォーク)batch import
help wanted

Repository metrics

Stars
 (21,741 個のスター)
PR merge metrics
 (PR metrics pending)

説明

i learned code below。

func (req *Request) Read(r *bufio.Reader) error {
	return req.ReadLimitBody(r, 0)
}

param r is io buf reader which could be a connection or something else。 i have a scene: goroutine read connection which is a very low eventloop with a fixed size of buffer,i dont wanna chang it。maybe i just get part of http bytes,not a complete http bytes,like chunk。 i cannot use Read method up there。 i did some research,netty has byteToMessageDecoder、envoy use http-parser (c++)https://github.com/nodejs/http-parser can we have this design future?

コントリビューターガイド