gnet-io / gnet-benchmarks

Benchmark test of gnet
MIT License
34 stars 12 forks source link

Fasthttp implementation #1

Closed kirillDanshin closed 5 years ago

kirillDanshin commented 5 years ago

As you can see here https://github.com/panjf2000/gnet_benchmarks/blob/master/fasthttp-server/main.go#L24

actually, you writing redundant \r\n. fasthttp already handles this for you. also, in such cases I'd recommend you to use https://godoc.org/github.com/valyala/fasthttp#Request.SetBody or SetBodyString.

finally, https://github.com/panjf2000/gnet_benchmarks/blob/master/fasthttp-server/main.go#L21 you actually don't need to use a goroutine for this log message

panjf2000 commented 5 years ago

@kirillDanshin Thanks for the feedbacks, I will renew it today after work.

panjf2000 commented 5 years ago

Updated.