Snapd.Client.new_from_socket
Description: Reference for Snapd.Client.new_from_socket

### Constructor

# Snapd Clientnew_from_socket

since: 1.5

#### Declaration [src]

    SnapdClient*
    snapd_client_new_from_socket (
      GSocket* socket
    )

#### Description [src]

Create a new client to talk on an existing socket.

Note that `socket` will be used by the first request only and closed once that request completes. Subsequent requests will re-open a new socket using the path returned by snapd_client_get_socket_path().

Available since: 1.5

#### Parameters

`socket`

  Type: `GSocket`

  A `GSocket` that is connected to snapd.

  The data is owned by the caller of the function.

#### Return value

Type: `SnapdClient`

A new `SnapdClient`.

The caller of the function takes ownership of the data, and is responsible for freeing it.