Skip to content

Commit 8876d54

Browse files
overflowzdarrachequesne
authored andcommitted
[docs] Document remoteDisconnect method (#179)
1 parent 11ab62b commit 8876d54

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

README.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -110,6 +110,17 @@ io.adapter.remoteLeave('<my-id>', 'room1', function (err) {
110110
});
111111
```
112112

113+
### RedisAdapter#remoteDisconnect(id:String, close:Boolean, fn:Function)
114+
115+
Makes the socket with the given id to get disconnected. If `close` is set to true, it also closes the underlying socket. The callback will be called once the socket was disconnected, or with an `err` argument if the socket was not found.
116+
117+
```js
118+
io.adapter.remoteDisconnect('<my-id>', true, function (err) {
119+
if (err) { /* unknown id */ }
120+
// success
121+
});
122+
```
123+
113124
### RedisAdapter#customRequest(data:Object, fn:Function)
114125

115126
Sends a request to every nodes, that will respond through the `customHook` method.

0 commit comments

Comments
 (0)