| Home | Libraries | People | FAQ | More

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

Set the text message write option.

Synopsis

    void
    text(
        bool value);

Description

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.

Parameters

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

Example

Setting the message type to text.

    ws.text(true);