### Constructor

# SpiceClientGLib Channel new

#### Declaration [src]

    SpiceChannel*
    spice_channel_new (
      SpiceSession* s,
      int type,
      int id
    )

#### Description [src]

Create a new `SpiceChannel` of type `type`, and channel ID `id`.

#### Parameters

`s`

  Type: `SpiceSession`

  The `SpiceSession` the channel is linked to.

  The data is owned by the caller of the function.

`type`

  Type: `int`

  The requested SPICECHANNELPRIVATE type.

`id`

  Type: `int`

  The channel-id.

#### Return value

Type: `SpiceChannel`

A weak reference to `SpiceChannel`, the session owns the reference.

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