Skip to content

Commit

Permalink
update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
jaywcjlove committed May 19, 2015
1 parent 031b6c0 commit 5cf1a12
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,9 @@ ws.connect('ws://127.0.0.1:8080',function(handlers,evn){
//连接成功!
},function(handlers,evn){
//关闭触发!
if(handlers.closeType === "kick"){
console.log('这个是踢下线!的关闭!')
}
},function(handlers,evn){
//连接失败!
})
Expand All @@ -38,10 +41,10 @@ ws.send('{}') //=>handlers
```

### 关闭连接的监听器
//ws.disconnect(callback)
//ws.disconnect(type,callback) 关闭类型

```js
ws.disconnect(function(data){
ws.disconnect("kick",function(data){

})
```
Expand Down

0 comments on commit 5cf1a12

Please sign in to comment.