|  | 
| 33 | 33 |     - [Event: 'connection'](#event-connect) | 
| 34 | 34 |     - [Flag: 'volatile'](#flag-volatile) | 
| 35 | 35 |     - [Flag: 'local'](#flag-local) | 
|  | 36 | +    - [Flag: 'binary'](#flag-binary) | 
| 36 | 37 |   - [Class: Socket](#socket) | 
| 37 | 38 |     - [socket.id](#socketid) | 
| 38 | 39 |     - [socket.rooms](#socketrooms) | 
|  | 
| 57 | 58 |     - [socket.disconnect(close)](#socketdisconnectclose) | 
| 58 | 59 |     - [Flag: 'broadcast'](#flag-broadcast) | 
| 59 | 60 |     - [Flag: 'volatile'](#flag-volatile-1) | 
|  | 61 | +    - [Flag: 'binary'](#flag-binary-1) | 
| 60 | 62 |     - [Event: 'disconnect'](#event-disconnect) | 
| 61 | 63 |     - [Event: 'error'](#event-error) | 
| 62 | 64 |     - [Event: 'disconnecting'](#event-disconnecting) | 
| @@ -470,6 +472,14 @@ Sets a modifier for a subsequent event emission that the event data may be lost | 
| 470 | 472 | io.volatile.emit('an event', { some: 'data' }); // the clients may or may not receive it | 
| 471 | 473 | ``` | 
| 472 | 474 | 
 | 
|  | 475 | +#### Flag: 'binary' | 
|  | 476 | + | 
|  | 477 | +Specifies whether there is binary data in the emitted data. Increases performance when specified. Can be `true` or `false`. | 
|  | 478 | + | 
|  | 479 | +```js | 
|  | 480 | +io.binary(false).emit('an event', { some: 'data' }); | 
|  | 481 | +``` | 
|  | 482 | + | 
| 473 | 483 | #### Flag: 'local' | 
| 474 | 484 | 
 | 
| 475 | 485 | Sets a modifier for a subsequent event emission that the event data will only be _broadcast_ to the current node (when the [Redis adapter](https://github.com/socketio/socket.io-redis) is used). | 
| @@ -769,6 +779,17 @@ io.on('connection', (socket) => { | 
| 769 | 779 | }); | 
| 770 | 780 | ``` | 
| 771 | 781 | 
 | 
|  | 782 | +#### Flag: 'binary' | 
|  | 783 | + | 
|  | 784 | +Specifies whether there is binary data in the emitted data. Increases performance when specified. Can be `true` or `false`. | 
|  | 785 | + | 
|  | 786 | +```js | 
|  | 787 | +var io = require('socket.io')(); | 
|  | 788 | +io.on('connection', function(socket){ | 
|  | 789 | +  socket.binary(false).emit('an event', { some: 'data' }); // The data to send has no binary data | 
|  | 790 | +}); | 
|  | 791 | +``` | 
|  | 792 | + | 
| 772 | 793 | #### Event: 'disconnect' | 
| 773 | 794 | 
 | 
| 774 | 795 |   - `reason` _(String)_ the reason of the disconnection (either client or server-side) | 
|  | 
0 commit comments