Function

GioTlsClientConnectionnew

Declaration

GIOStream*
g_tls_client_connection_new (
  GIOStream* base_io_stream,
  GSocketConnectable* server_identity,
  GError** error
)

Description

Creates a new GTlsClientConnection wrapping base_io_stream (which must have pollable input and output streams) which is assumed to communicate with the server identified by server_identity.

See the documentation for GTlsConnection:base-io-stream for restrictions on when application code can run operations on the base_io_stream after this function has returned.

Available since:2.28

Parameters

base_io_stream

Type: GIOStream

The GIOStream to wrap.

The data is owned by the caller of the function.
server_identity

Type: GSocketConnectable

The expected identity of the server.

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

Type: GError **

The return location for a GError*, or NULL.

Return value

Type: GTlsClientConnection

The new GTlsClientConnection, or NULL on error.

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