Protocol
WebSocketConnectionDelegate
public protocol WebSocketConnectionDelegate: AnyObject
Defines a delegate for a websocket connection.
Relationships
Conforms To
AnyObject
Requirements
webSocketDidConnect(connection:)
func webSocketDidConnect(connection: WebSocketConnection)
websocketDidPrepare(connection:)
func websocketDidPrepare(connection: WebSocketConnection)
webSocketDidDisconnect(connection:closeCode:reason:)
func webSocketDidDisconnect(connection: WebSocketConnection, closeCode: NWProtocolWebSocket.CloseCode, reason: Data?)
websocketDidCancel(connection:)
func websocketDidCancel(connection: WebSocketConnection)
webSocketDidReceiveError(connection:error:)
func webSocketDidReceiveError(connection: WebSocketConnection, error: Error)
webSocketDidReceivePong(connection:)
func webSocketDidReceivePong(connection: WebSocketConnection)
webSocketDidReceiveMessage(connection:string:)
func webSocketDidReceiveMessage(connection: WebSocketConnection, string: String)
webSocketDidReceiveMessage(connection:data:)
func webSocketDidReceiveMessage(connection: WebSocketConnection, data: Data)