gi-gio-2.0.27: Gio bindings

Copyright | Will Thompson Iñaki García Etxebarria and Jonas Platte
License | LGPL-2.1
Maintainer | Iñaki García Etxebarria
Safe Haskell | None
Language | Haskell2010

GI.Gio.Interfaces.TlsServerConnection

Contents

- Exported types
- Methods
  - Overloaded methods
  - new
- Properties
  - authenticationMode

Description

`TlsServerConnection` is the server-side subclass of `TlsConnection`, representing a server-side TLS connection.

Since: 2.28

Synopsis

- newtype TlsServerConnection = TlsServerConnection (ManagedPtr TlsServerConnection)
- class (GObject o, IsDescendantOf TlsServerConnection o) => IsTlsServerConnection o
- toTlsServerConnection :: (MonadIO m, IsTlsServerConnection o) => o -> m TlsServerConnection
- tlsServerConnectionNew :: (HasCallStack, MonadIO m, IsIOStream a, IsTlsCertificate b) => a -> Maybe b -> m TlsServerConnection
- constructTlsServerConnectionAuthenticationMode :: (IsTlsServerConnection o, MonadIO m) => TlsAuthenticationMode -> m (GValueConstruct o)
- getTlsServerConnectionAuthenticationMode :: (MonadIO m, IsTlsServerConnection o) => o -> m TlsAuthenticationMode
- setTlsServerConnectionAuthenticationMode :: (MonadIO m, IsTlsServerConnection o) => o -> TlsAuthenticationMode -> m ()

# Exported types

newtype TlsServerConnection Source #

Memory-managed wrapper type.

Constructors

TlsServerConnection (ManagedPtr TlsServerConnection) |

#### Instances

Instances details

Eq TlsServerConnection Source # |
Instance details Defined in GI.Gio.Interfaces.TlsServerConnection Methods (==) :: TlsServerConnection -> TlsServerConnection -> Bool # (/=) :: TlsServerConnection -> TlsServerConnection -> Bool #
GObject TlsServerConnection Source # |
Instance details Defined in GI.Gio.Interfaces.TlsServerConnection
TypedObject TlsServerConnection Source # |
Instance details Defined in GI.Gio.Interfaces.TlsServerConnection Methods glibType :: IO GType Source #
ManagedPtrNewtype TlsServerConnection Source # |
Instance details Defined in GI.Gio.Interfaces.TlsServerConnection Methods toManagedPtr :: TlsServerConnection -> ManagedPtr TlsServerConnection Source #
IsGValue TlsServerConnection Source # | Convert `TlsServerConnection` to and from `GValue` with `toGValue` and `fromGValue`.
Instance details Defined in GI.Gio.Interfaces.TlsServerConnection Methods toGValue :: TlsServerConnection -> IO GValue Source # fromGValue :: GValue -> IO TlsServerConnection Source #
HasParentTypes TlsServerConnection Source # |
Instance details Defined in GI.Gio.Interfaces.TlsServerConnection
type ParentTypes TlsServerConnection Source # |
Instance details Defined in GI.Gio.Interfaces.TlsServerConnection type ParentTypes TlsServerConnection = '[Object, TlsConnection, IOStream]

class (GObject o, IsDescendantOf TlsServerConnection o) => IsTlsServerConnection o Source #

Type class for types which can be safely cast to `TlsServerConnection`, for instance with `toTlsServerConnection`.

#### Instances

Instances details

(GObject o, IsDescendantOf TlsServerConnection o) => IsTlsServerConnection o Source # |
Instance details Defined in GI.Gio.Interfaces.TlsServerConnection

toTlsServerConnection :: (MonadIO m, IsTlsServerConnection o) => o -> m TlsServerConnection Source #

Cast to `TlsServerConnection`, for types for which this is known to be safe. For general casts, use `castTo`.

# Methods

## Overloaded methods

## new

tlsServerConnectionNew Source #

Arguments

:: (HasCallStack, MonadIO m, IsIOStream a, IsTlsCertificate b) |
=> a | `baseIoStream`: the `IOStream` to wrap
-> Maybe b | `certificate`: the default server certificate, or `Nothing`
-> m TlsServerConnection | Returns: the new `TlsServerConnection`, or `Nothing` on error (Can throw `GError`)

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

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

Since: 2.28

# Properties

## authenticationMode

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

Since: 2.28

constructTlsServerConnectionAuthenticationMode :: (IsTlsServerConnection o, MonadIO m) => TlsAuthenticationMode -> m (GValueConstruct o) Source #

Construct a `GValueConstruct` with valid value for the “`authentication-mode`” property. This is rarely needed directly, but it is used by `new`.

getTlsServerConnectionAuthenticationMode :: (MonadIO m, IsTlsServerConnection o) => o -> m TlsAuthenticationMode Source #

Get the value of the “`authentication-mode`” property. When overloading is enabled, this is equivalent to

    get tlsServerConnection #authenticationMode

setTlsServerConnectionAuthenticationMode :: (MonadIO m, IsTlsServerConnection o) => o -> TlsAuthenticationMode -> m () Source #

Set the value of the “`authentication-mode`” property. When overloading is enabled, this is equivalent to

    set tlsServerConnection [ #authenticationMode := value ]