Interface NSURLSessionWebSocketDelegate

    • Method Detail

      • URLSessionWebSocketTaskDidCloseWithCodeReason

        default void URLSessionWebSocketTaskDidCloseWithCodeReason​(NSURLSession session,
                                                                   NSURLSessionWebSocketTask webSocketTask,
                                                                   long closeCode,
                                                                   NSData reason)
        Indicates that the WebSocket has received a close frame from the server endpoint. The close code and the close reason may be provided by the delegate if the server elects to send this information in the close frame
      • URLSessionWebSocketTaskDidOpenWithProtocol

        default void URLSessionWebSocketTaskDidOpenWithProtocol​(NSURLSession session,
                                                                NSURLSessionWebSocketTask webSocketTask,
                                                                java.lang.String protocol)
        Indicates that the WebSocket handshake was successful and the connection has been upgraded to webSockets. It will also provide the protocol that is picked in the handshake. If the handshake fails, this delegate will not be invoked.