mirror of
https://github.com/apple/swift-nio
synced 2026-11-28 05:14:23 +00:00
Motivation: There is a client protocol upgrader but, unlike the server protocol upgrader, it does not have a WebSocket protocol as part of the project. Modifications: Made the magic WebSocket GUID public to the WebSockets project. Added a NIOWebSocketClientUpgrader. Added tests for the upgrader. Updated the Linux test script files. Result: The project now has a WebSocket client upgrader to match the WebSocket server upgrader.
39 lines
1.3 KiB
Swift
39 lines
1.3 KiB
Swift
//===----------------------------------------------------------------------===//
|
|
//
|
|
// This source file is part of the SwiftNIO open source project
|
|
//
|
|
// Copyright (c) 2017-2018 Apple Inc. and the SwiftNIO project authors
|
|
// Licensed under Apache License v2.0
|
|
//
|
|
// See LICENSE.txt for license information
|
|
// See CONTRIBUTORS.txt for the list of SwiftNIO project authors
|
|
//
|
|
// SPDX-License-Identifier: Apache-2.0
|
|
//
|
|
//===----------------------------------------------------------------------===//
|
|
//
|
|
// WebSocketClientEndToEndTests+XCTest.swift
|
|
//
|
|
import XCTest
|
|
|
|
///
|
|
/// NOTE: This file was generated by generate_linux_tests.rb
|
|
///
|
|
/// Do NOT edit this file directly as it will be regenerated automatically when needed.
|
|
///
|
|
|
|
extension WebSocketClientEndToEndTests {
|
|
|
|
static var allTests : [(String, (WebSocketClientEndToEndTests) -> () throws -> Void)] {
|
|
return [
|
|
("testSimpleUpgradeSucceeds", testSimpleUpgradeSucceeds),
|
|
("testRejectUpgradeIfMissingAcceptKey", testRejectUpgradeIfMissingAcceptKey),
|
|
("testRejectUpgradeIfIncorrectAcceptKey", testRejectUpgradeIfIncorrectAcceptKey),
|
|
("testRejectUpgradeIfNotWebsocket", testRejectUpgradeIfNotWebsocket),
|
|
("testSendAFewFrames", testSendAFewFrames),
|
|
("testReceiveAFewFrames", testReceiveAFewFrames),
|
|
]
|
|
}
|
|
}
|
|
|