Soup.ServerWebsocketCallback
Description: Reference for Soup.ServerWebsocketCallback

### Function

# SoupServerWebsocketCallback

#### Declaration

    void
    (* SoupServerWebsocketCallback) (
      SoupServer* server,
      SoupServerMessage* msg,
      const char* path,
      SoupWebsocketConnection* connection,
      gpointer user_data
    )

#### Description [src]

A callback used to handle WebSocket requests to a `SoupServer`.

The callback will be invoked after sending the handshake response back to the client (and is only invoked if the handshake was successful).

`path` contains the path of the Request-URI, subject to the same rules as `SoupServerCallback` `(qv)`.

#### Parameters

`server` | `SoupServer`
| The `SoupServer`.
| The data is owned by the caller of the function.
`msg` | `SoupServerMessage`
| The `SoupServerMessage`.
| The data is owned by the caller of the function.
`path` | `const char*`
| The path component of `msg`‘s Request-URI.
| The data is owned by the caller of the function.
| The value is a NUL terminated UTF-8 string.
`connection` | `SoupWebsocketConnection`
| The newly created WebSocket connection.
| The data is owned by the caller of the function.
`user_data` | `gpointer`
| The data passed to `soup_server_add_handler`.
| The argument can be `NULL`.
| The data is owned by the caller of the function.