在用Go语言重构项目的时候,需要用Go重新搭建Websocket,去网上查了一些资料,利用 gorilla/websocket 在嵌套web框架就可以实现websocket,目前采用Go语言的iris Web框架,接下来就说说我是怎么实现的。
这里有个评测:https://github.com/smallnest/go-web-framework-benchmark最快的还是fasthttp,iris也是基于fasthttp的,不会比fasthttp快
在用Go语言重构项目的时候,需要用Go重新搭建Websocket,去网上查了一些资料,利用 gorilla/websocket 在嵌套web框架就可以实现websocket,目前采用Go语言的iris Web框架,接下来就说说我是怎么实现的。
这里有个评测:https://github.com/smallnest/go-web-framework-benchmark最快的还是fasthttp,iris也是基于fasthttp的,不会比fasthttp快