HAConnectionInfo

public struct HAConnectionInfo : Equatable

Information for connecting to the server

  • Certificate validation handler

    Declaration

    Swift

    public typealias EvaluateCertificate = (SecTrust, (Result<Void, Error>) -> Void) -> Void
  • Client identity provider for mTLS

    Declaration

    Swift

    public typealias ClientIdentityProvider = () -> SecIdentity?
  • Create a connection info

    Declaration

    Swift

    public init(
        url: URL,
        userAgent: String? = nil,
        evaluateCertificate: EvaluateCertificate? = nil,
        clientIdentity: ClientIdentityProvider? = nil
    ) throws
  • url

    The base URL for the WebSocket connection

    Declaration

    Swift

    public var url: URL
  • The URL used to connect to the WebSocket API

    Declaration

    Swift

    public var webSocketURL: URL { get }
  • The user agent to use in the connection

    Declaration

    Swift

    public var userAgent: String?
  • Declaration

    Swift

    public static func == (lhs: HAConnectionInfo, rhs: HAConnectionInfo) -> Bool