2025-02-02 10:58:00
When using HTTP, whether in a browser or an SDK's HTTP client, we often have the need to reuse HTTP connections. This means making multiple HTTP requests and responses over the same connection, a concept commonly known as HTTP persistent connection (Keep-Alive). In this article, we will explore persistent connections from both the protocol support perspective and its practical implementation in Go.
2025-02-02 10:58:00
在使用 HTTP 的过程中,无论是浏览器还是 SDK 的 http 客户端,我们可能都会有需求希望能够复用 HTTP 连接,也就是在同一条 HTTP 连接上请求和响应多次 HTTP 请求,这也是我们常说的 HTTP 长连接。 那么本文就将从 HTTP 长连接的协议支持已经实际 Go 实现上来介绍一下长连接的相关知识。
2025-01-30 14:37:00
在使用 Go 开发跨进程的应用时,我们总是离不开 Context,使用 Context 的原因多样,但是避不开的一个话题就是 Go 的 Context 是如何在多个进程中流转的,例如一个 Context 的值是如何从一个进程传递到另外一个进程的,本文就以个人的经历为例,尝试介绍一些和 Context 相关的内容。
2025-01-30 14:37:00
When developing inter-process applications in Go, we always rely on Context. There are various reasons for using Context, but one unavoidable topic is how Go's Context propagates across multiple processes. For example, how a value in a Context is passed from one process to another. This article, based on my personal experience, attempts to introduce some concepts related to Context.
2025-01-26 17:16:00
在 Go 编写程序时,我们经常会用到超时的控制,但是,如果使用不当的话,那么很容易就出现一个内存泄露的问题,本文尝试从实践和原理上解释一下为什么会出现问题,并且介绍一下解决方式。
2025-01-26 17:14:00
在 Go 编写程序时,我们经常会用到超时的控制,但是,如果使用不当的话,那么很容易就出现一个内存泄露的问题,本文尝试从实践和原理上解释一下为什么会出现问题,并且介绍一下解决方式。