网站首页
编程语言
数据库
系统相关
其他分享
编程问答
roomInfo
2024-06-08
Go使用websocket+nats队列实现聊天
示例用的github.com/olahol/melody其实是在gorilla/websocket的基础上封装了一下packagemainimport( "encoding/json" "fmt" "github.com/nats-io/nats.go" "github.com/olahol/melody" "log" "net/http" "runti