Function

GioTlsServerConnectionnew

Declaration

GIOStream*
g_tls_server_connection_new (
  GIOStream* base_io_stream,
  GTlsCertificate* certificate,
  GError** error
)

Description

Creates a new GTlsServerConnection wrapping base_io_stream (which must have pollable input and output streams).

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.
certificate

Type: GTlsCertificate

The default server certificate, or NULL.

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: GTlsServerConnection

The new GTlsServerConnection, or NULL on error.

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