You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
As described in the title. How does Response.Write make sure that client can receive reponse-bytes immediately without Flush() opt ?
The text was updated successfully, but these errors were encountered:
stormgbs
changed the title
How does Response.Write make sure that client receive reponse-bytes without Flush() opt ?
How does Response.Write make sure that client can receive reponse-bytes immediately without Flush() opt ?
Jan 21, 2016
There were two options for sending responses with fasthttp until today:
Via fasthttp.Server. The server automatically sends http response after user's code returns from the outer RequestHandler . See Server.serveConn implementation for details.
Via Response.Write call. In this case the caller must call bufio.Writer.Flush in order to make sure the response is sent to the client.
After the commit f8c0d95 yet another approach has been appeared for sending responses - using Response.WriteTo.
Thank @valyala , fasthttp is owesome:) . I am writeing a http router(http reverse proxy) based on fasthttp, I modified some fasthttp code, so that I can copy response bytes from lower conn(proxy<-->backend server) to upper-conn(client <--> proxy) directly.
zwirec
pushed a commit
to zwirec/fasthttp
that referenced
this issue
Jul 12, 2018
As described in the title. How does Response.Write make sure that client can receive reponse-bytes immediately without Flush() opt ?
The text was updated successfully, but these errors were encountered: