go-light-websocket:Go中的WebSocket守护程序。 尝试优化内存和CPU消耗

时间:2021-05-23 01:06:33
【文件属性】:
文件名称:go-light-websocket:Go中的WebSocket守护程序。 尝试优化内存和CPU消耗
文件大小:19KB
文件格式:ZIP
更新时间:2021-05-23 01:06:33
Go go-light-websocket WebSocket协议实现,具有最小的内存开销。 例子 package main import ( "github.com/mialinx/go-light-websocket" "log" "net/http" ) func handshake ( wsc * websocket. Connection , req * http. Request , rspw http. ResponseWriter ) websocket. HandlerFunc { reverse := false if r := req . FormValue ( "reverse" ); r == "1" { reverse = true } return func ( wsc * websocke
【文件预览】:
go-light-websocket-master
----frame.go(3KB)
----message.go(2KB)
----const.go(2KB)
----http.go(842B)
----server.go(3KB)
----connection.go(13KB)
----.gitignore(266B)
----demo()
--------ws-echo()
--------ws-push()
--------ws-countdown()
----README.md(3KB)
----stats.go(5KB)
----chans.go(2KB)

网友评论