Skip to content
leeway edited this page Nov 19, 2021 · 1 revision

CocoaMQTTWebSocket

public class CocoaMQTTWebSocket: CocoaMQTTSocketProtocol 

Inheritance

CocoaMQTTSocketProtocol, CocoaMQTTWebSocketConnectionDelegate

Nested Type Aliases

ConnectionBuilder

public typealias ConnectionBuilder = CocoaMQTTWebSocketConnectionBuilder

Initializers

init(uri:builder:)

public init(uri: String = "", builder: ConnectionBuilder = CocoaMQTTWebSocket.DefaultConnectionBuilder()) 

Properties

enableSSL

public var enableSSL = false

headers

public var headers: [String: String] = [:]

Methods

setDelegate(_:delegateQueue:)

public func setDelegate(_ theDelegate: CocoaMQTTSocketDelegate?, delegateQueue: DispatchQueue?) 

connect(toHost:onPort:)

public func connect(toHost host: String, onPort port: UInt16) throws 

connect(toHost:onPort:withTimeout:)

public func connect(toHost host: String, onPort port: UInt16, withTimeout timeout: TimeInterval) throws 

disconnect()

public func disconnect() 

readData(toLength:withTimeout:tag:)

public func readData(toLength length: UInt, withTimeout timeout: TimeInterval, tag: Int) 

write(_:withTimeout:tag:)

public func write(_ data: Data, withTimeout timeout: TimeInterval, tag: Int) 

connection(_:didReceive:completionHandler:)

public func connection(_ conn: CocoaMQTTWebSocketConnection, didReceive trust: SecTrust, completionHandler: @escaping (Bool) -> Swift.Void) 

connectionOpened(_:)

public func connectionOpened(_ conn: CocoaMQTTWebSocketConnection) 

connectionClosed(_:withError:)

public func connectionClosed(_ conn: CocoaMQTTWebSocketConnection, withError error: Error?) 

connection(_:receivedString:)

public func connection(_ conn: CocoaMQTTWebSocketConnection, receivedString string: String) 

connection(_:receivedData:)

public func connection(_ conn: CocoaMQTTWebSocketConnection, receivedData data: Data) 
Types
Protocols
Global Variables
Clone this wiki locally