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

FoundationStream

open class FoundationStream : NSObject, WSStream, StreamDelegate  

Inheritance

NSObject, StreamDelegate, WSStream

Properties

delegate

public weak var delegate: WSStreamDelegate?

enableSOCKSProxy

public var enableSOCKSProxy = false

Methods

connect(url:port:timeout:ssl:completion:)

public func connect(url: URL, port: Int, timeout: TimeInterval, ssl: SSLSettings, completion: @escaping ((Error?) -> Void)) 

write(data:)

public func write(data: Data) -> Int 

read()

public func read() -> Data? 

cleanup()

public func cleanup() 

sslTrust()

!((os(Linux) || os(watchOS)))
public func sslTrust() -> (trust: SecTrust?, domain: String?) 

stream(_:handle:)

Delegate for the stream methods. Processes incoming bytes

open func stream(_ aStream: Stream, handle eventCode: Stream.Event) 
Types
Protocols
Global Variables
Clone this wiki locally