Go language brings built-in package “net”, and there is an important and convenient subpackage “net/http” based on it.
To prevent from connection occupication or even hijacked, we need to setup timeout for every step of http request and response. So we can ensure that resources are not occupied or leaked.
However, we can only limit total elapsed time for every step of http request and response, we have no easy way to decide data stream timeout for huge streaming request and streaming response (ex: file uploading and downloading).
Thus I propose a new Go package, describe implementation, point out weak part of its implementation I could not make it better from now on.
Hope this package could help programmers to do streaming request easier. And wish there are some contributors to submits patches, issues, and feature requests to refine this package.
- describe http timeout model
- problems of streaming http requests
- an open source Go package implemented by me
- explain unresolved issue of timer functions under built-in package “time”
- what else we could do for package refinement in the future
About Hsueh-Tsung Kuo
- backend developer from Rayark Inc.
- main and almost the only one backend developer of rhythm game VOEZ
- supplemental developer of puzzle RPG Sdorica -sunset-
- test server performance and advise tuning direction for Soul of Eden
- common service developer