| Home | Libraries | People | FAQ | More

###### websocket::stream::binary (1 of 2 overloads)

Set the binary message write option.

<h7> Synopsis </h7>

    void
    binary(
        bool value);

<h7> Description </h7>

This controls whether or not outgoing message opcodes are set to binary or text. The setting is only applied at the start when a caller begins a new message. Changing the opcode after a message is started will only take effect after the current message being sent is complete. The default setting is to send text messages.

<h7> Parameters </h7>

Name | Description
--- | ---
`value` | `true` if outgoing messages should indicate binary, or `false` if they should indicate text.

<h7> Example </h7>

Setting the message type to binary.

    ws.binary(true);