Skip to content

init(configuration:wire:authenticationProvider:statusListener:)

Creates a Flake Client

swift
init(configuration: FlakeClientConfiguration = .default, wire: Wire, authenticationProvider: AuthenticationProvider = EmptyAuthenticationProvider(), statusListener: @escaping ConnectionStatusListener = { _ in }) async

Discussion

  • Parameters

  • configuration: Configuration Object, defaults toFlakeClientConfiguration.default

  • wire: The Wire used to connect, for example a TCP Connection.

  • authenticationProvider: if the connection needs an authentication, this object can add additional properties to the connect Message. Defaults to EmptyAuthenticationProvider

  • statusListener: An optional callback to receive changes to ConnectionStatus. Alternativly use connectionStatusPublisher