Skip to content

Latest commit

 

History

History
19 lines (14 loc) · 587 Bytes

README.md

File metadata and controls

19 lines (14 loc) · 587 Bytes

crab

golang写的websocket服务,支持超过连接数(实测12w+稳定连接,程序自带压测工具,感兴趣可以测试下)。

1m-go-websockets启发

usage

run

$ run cmd/server/server.go
#open a new terminal 
$ run cmd/client/client.go
#open a new terminal
$ curl -X POST -d "sn=no123456&msg=msg1" http://localhost:9333/send_msg
$ curl -X POST -d "channel=channel1&msg=broadcastinchannel" http://localhost:9333/broadcastinchannel
$ curl -X POST -d "msg=broadcastmsg" http://localhost:9333/broadcast