Skip to content

zhu327/orpush

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

orpush

基于OpenResty的websocket推送框架

启动

nginx -p `pwd`/ -c conf/nginx.conf

连接

var s = new WebSocket('ws://localhost:8080/ws');

s.onmessage = function(v){
    console.log(v.data);
}

推送

curl -X POST \
  http://localhost:8080/emitor \
  -H 'content-type: application/json' \
  -d '{
    "session_id": 100001,
    "message": "Hello, World!"
}'

About

websocket push framework via OpenResty

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published