mirror of
https://github.com/apple/swift-nio-extras.git
synced 2025-05-15 09:22:38 +08:00
This class is a type of byte to message encoder. Motivation: To encode a prepended length field on data so that messages of arbitrary size can be sent. Can work as a pair with the ‘LengthFieldBasedFrameDecoder’. Modifications: Added ‘LengthFieldPrepender’ Added unit tests for ‘LengthFieldPrepender’ in ‘LengthFieldPrependerTest’ Updated the linux text files by running the script. Result: The length can now be easily prepended to any message.
36 lines
1.0 KiB
Swift
36 lines
1.0 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
|
|
//
|
|
//===----------------------------------------------------------------------===//
|
|
//
|
|
// LinuxMain.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.
|
|
///
|
|
|
|
#if os(Linux) || os(FreeBSD)
|
|
@testable import NIOExtrasTests
|
|
|
|
XCTMain([
|
|
testCase(FixedLengthFrameDecoderTest.allTests),
|
|
testCase(LengthFieldBasedFrameDecoderTest.allTests),
|
|
testCase(LengthFieldPrependerTest.allTests),
|
|
testCase(LineBasedFrameDecoderTest.allTests),
|
|
testCase(QuiescingHelperTest.allTests),
|
|
])
|
|
#endif
|