https://github.com/tidwall/evio https://github.com/Allenxuxu/eviop/ https://github.com/Allenxuxu/gev 最近翻了 evio 的源码,发现一些问题,主要集中在 linux 平台 epoll 上和读写的处理。
http://xiaorui.cc/archives/6758 https://github.com/panjf2000/gnet golang标准库net很优秀,可以让开发者轻易构建非阻塞网络服务,但开发爽快带来的问题协程数加大,比如在net/http里一个连接两个协程,grpc算是业务和keepalive心跳是四个协程,数据的进出是通过channel传输。
https://www.gorillatoolkit.org/pkg/websocket Overview The Conn type represents a WebSocket connection. A server application calls the Upgrader.Upgrade method from an HTTP request handler to get a *Conn: 使用Go语言创建WebSocket服务 今天介绍如何用Go语言创建WebSocket服务,文章的前两部分简要介绍了WebSocket协议以及用Go标准库如何创建WebSocket服务。第三部分实践环节我们使用了gorilla/websocket库帮助我们快速构建WebSocket服务,它帮封装了使用Go标准库实现WebSocket服务相关的基础逻辑,让我们能从繁琐的底层代码中解脱出来,根据业务需求快速构建WebSocket服务。
https://www.pixelstech.net/article/1584241521-Understand-unsafe-in-GoLang before going to understand unsafe package in GoLang, the first thing needs to talk about is the pointer in GoLang. If you have a background of C language, you must know what pointer means and its usage. With pointer, you are free to operate any data at memory level which means you have great power, but this means that you have great responsibility as well. That’s why it might be considered unsafe in lots of cases. ake a look at a simple example of doubling an integer.