WebSocketEngine
public class WebSocketEngine: WebSocketEngineProtocol, WebSocketTransportEventClient, WebSocketFramerEventClient,
WebSocketFrameCollectorDelegate, WebSocketHTTPHandlerDelegate, @unchecked Sendable
Undocumented
-
Undocumented
Declaration
Swift
public var respondToPingWithPong: Bool
-
Undocumented
Declaration
Swift
public init(transport: WebSocketTransport, certPinner: WebSocketCertificatePinning? = nil, headerValidator: WebSocketHeaderValidator = WebSocketFoundationSecurity(), httpHandler: WebSocketHTTPHandler = WebSocketFoundationHTTPHandler(), framer: WebSocketFramerProtocol = WebSocketFramer(), compressionHandler: WebSocketCompressionHandler? = nil)
-
Undocumented
Declaration
Swift
public func register(delegate: WebSocketEngineDelegate)
-
Undocumented
Declaration
Swift
public func start(request: URLRequest)
-
Undocumented
Declaration
Swift
public func stop(closeCode: UInt16 = WebSocketCloseCode.normal.rawValue)
-
Undocumented
Declaration
Swift
public func forceStop()
-
Undocumented
Declaration
Swift
public func write(string: String, completion: (@Sendable () -> Void)?)
-
Undocumented
Declaration
Swift
public func write(data: Data, opcode: WebSocketFrameOpCode, completion: (@Sendable () -> Void)?)
-
Undocumented
Declaration
Swift
public func connectionChanged(state: WebSocketConnectionState)
-
Undocumented
Declaration
Swift
public func didReceiveHTTP(event: WebSocketHTTPEvent)
-
Undocumented
Declaration
Swift
public func frameProcessed(event: WebSocketFrameEvent)
-
Undocumented
Declaration
Swift
public func decompress(data: Data, isFinal: Bool) -> Data?
-
Undocumented
Declaration
Swift
public func didForm(event: WebSocketFrameCollector.Event)