## GTlsServerConnection

GTlsServerConnection — TLS server-side connection

## Functions

GIOStream * | g_tls_server_connection_new ()

## Properties

GTlsAuthenticationMode | authentication-mode | Read / Write

## Types and Values

| GTlsServerConnection
struct | GTlsServerConnectionInterface

## Object Hierarchy

        GInterface
        ╰── GTlsServerConnection

## Prerequisites

GTlsServerConnection requires GTlsConnection.

## Includes

    #include <gio/gio.h>

## Description

GTlsServerConnection is the server-side subclass of GTlsConnection, representing a server-side TLS connection.

## Functions

### g_tls_server_connection_new ()

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

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

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

#### Parameters

base_io_stream | the GIOStream to wrap |
certificate | the default server certificate, or `NULL`. | [nullable]
error | GError for error reporting, or `NULL` to ignore. |

#### Returns

the new GTlsServerConnection, or `NULL` on error.

[transfer full][type GTlsServerConnection]

Since: 2.28

## Types and Values

### GTlsServerConnection

    typedef struct _GTlsServerConnection GTlsServerConnection;

TLS server-side connection. This is the server-side implementation of a GTlsConnection.

Since: 2.28

### struct GTlsServerConnectionInterface

    struct GTlsServerConnectionInterface {
      GTypeInterface g_iface;
    };

vtable for a GTlsServerConnection implementation.

#### Members

Since: 2.26

## Property Details

### The `“authentication-mode”` property

      “authentication-mode”      GTlsAuthenticationMode

The GTlsAuthenticationMode for the server. This can be changed before calling `g_tls_connection_handshake()` if you want to rehandshake with a different mode from the initial handshake.

Flags: Read / Write

Default value: G_TLS_AUTHENTICATION_NONE

Since: 2.28