Soup.WebsocketConnection.send_message

### Method

# Soup WebsocketConnectionsend_message

#### Declaration [src]

    void
    soup_websocket_connection_send_message (
      SoupWebsocketConnection* self,
      SoupWebsocketDataType type,
      GBytes* message
    )

#### Description [src]

Send a message of the given `type` to the peer. Note that this method, allows to send text messages containing `NULL` characters.

The message is queued to be sent and will be sent when the main loop is run.

#### Parameters

`type`

  Type: `SoupWebsocketDataType`

  The type of message contents.

`message`

  Type: `GBytes`

  The message data as `GBytes`.

  The data is owned by the caller of the function.