### Function

# Soup ServerWebsocketCallback

since: 3.0

#### 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)`.

Available since: 3.0

#### Parameters

`server`

  Type: `SoupServer`

  The `SoupServer`.

  The data is owned by the caller of the function.

`msg`

  Type: `SoupServerMessage`

  The `SoupServerMessage`.

  The data is owned by the caller of the function.

`path`

  Type: `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`

  Type: `SoupWebsocketConnection`

  The newly created WebSocket connection.

  The data is owned by the caller of the function.

`user_data`

  Type: `gpointer`

  The data passed to `soup_server_add_handler`.

  The argument can be `NULL`.
  The data is owned by the caller of the function.