Skip to content

Commit

Permalink
Replace NIOSendable with Sendable (#181)
Browse files Browse the repository at this point in the history
  • Loading branch information
dnadoba authored Oct 13, 2022
1 parent e9ed606 commit d373eaf
Show file tree
Hide file tree
Showing 11 changed files with 15 additions and 15 deletions.
2 changes: 1 addition & 1 deletion Sources/NIOExtras/NIOLengthFieldBitLength.swift
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
import NIOCore

/// A struct to describe the length of a piece of data in bits
public struct NIOLengthFieldBitLength: NIOSendable {
public struct NIOLengthFieldBitLength: Sendable {
internal enum Backing {
case bits8
case bits16
Expand Down
2 changes: 1 addition & 1 deletion Sources/NIOExtras/QuiescingHelper.swift
Original file line number Diff line number Diff line change
Expand Up @@ -256,6 +256,6 @@ public final class ServerQuiescingHelper {
}
}

extension ServerQuiescingHelper: NIOSendable {
extension ServerQuiescingHelper: Sendable {

}
2 changes: 1 addition & 1 deletion Sources/NIOHTTPCompression/HTTPCompression.swift
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ import NIOCore
public enum NIOCompression {

/// Which algorithm should be used for compression.
public struct Algorithm: CustomStringConvertible, Equatable, NIOSendable {
public struct Algorithm: CustomStringConvertible, Equatable, Sendable {
fileprivate enum AlgorithmEnum: String {
case gzip
case deflate
Expand Down
2 changes: 1 addition & 1 deletion Sources/NIOHTTPCompression/HTTPDecompression.swift
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ import NIOCore
/// Namespace for decompression code.
public enum NIOHTTPDecompression {
/// Specifies how to limit decompression inflation.
public struct DecompressionLimit: NIOSendable {
public struct DecompressionLimit: Sendable {
private enum Limit {
case none
case size(Int)
Expand Down
2 changes: 1 addition & 1 deletion Sources/NIOSOCKS/Channel Handlers/SOCKSClientHandler.swift
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,7 @@ extension SOCKSClientHandler: RemovableChannelHandler {
/// A `Channel` user event that is sent when a SOCKS connection has been established
///
/// After this event has been received it is save to remove the `SOCKSClientHandler` from the channel pipeline.
public struct SOCKSProxyEstablishedEvent: NIOSendable {
public struct SOCKSProxyEstablishedEvent: Sendable {
public init() {
}
}
2 changes: 1 addition & 1 deletion Sources/NIOSOCKS/Messages/AuthenticationMethod.swift
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
import NIOCore

/// The SOCKS authentication method to use, defined in RFC 1928.
public struct AuthenticationMethod: Hashable, NIOSendable {
public struct AuthenticationMethod: Hashable, Sendable {

/// No authentication required
public static let noneRequired = AuthenticationMethod(value: 0x00)
Expand Down
2 changes: 1 addition & 1 deletion Sources/NIOSOCKS/Messages/ClientGreeting.swift
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ import NIOCore
/// Clients begin the SOCKS handshake process
/// by providing an array of suggested authentication
/// methods.
public struct ClientGreeting: Hashable, NIOSendable {
public struct ClientGreeting: Hashable, Sendable {

/// The protocol version.
public let version: UInt8 = 5
Expand Down
4 changes: 2 additions & 2 deletions Sources/NIOSOCKS/Messages/Messages.swift
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
import NIOCore

/// Sent by the client and received by the server.
public enum ClientMessage: Hashable, NIOSendable {
public enum ClientMessage: Hashable, Sendable {

/// Contains the proposed authentication methods.
case greeting(ClientGreeting)
Expand All @@ -28,7 +28,7 @@ public enum ClientMessage: Hashable, NIOSendable {
}

/// Sent by the server and received by the client.
public enum ServerMessage: Hashable, NIOSendable {
public enum ServerMessage: Hashable, Sendable {

/// Used by the server to instruct the client of the authentication method to use.
case selectedAuthenticationMethod(SelectedAuthenticationMethod)
Expand Down
6 changes: 3 additions & 3 deletions Sources/NIOSOCKS/Messages/SOCKSRequest.swift
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ import NIOCore

/// Instructs the SOCKS proxy server of the target host,
/// and how to connect.
public struct SOCKSRequest: Hashable, NIOSendable {
public struct SOCKSRequest: Hashable, Sendable {

/// The SOCKS protocol version - we currently only support v5.
public let version: UInt8 = 5
Expand Down Expand Up @@ -75,7 +75,7 @@ extension ByteBuffer {

/// What type of connection the SOCKS server should establish with
/// the target host.
public struct SOCKSCommand: Hashable, NIOSendable {
public struct SOCKSCommand: Hashable, Sendable {

/// Typically the primary connection type, suitable for HTTP.
public static let connect = SOCKSCommand(value: 0x01)
Expand All @@ -99,7 +99,7 @@ public struct SOCKSCommand: Hashable, NIOSendable {
// MARK: - SOCKSAddress

/// The address used to connect to the target host.
public enum SOCKSAddress: Hashable, NIOSendable {
public enum SOCKSAddress: Hashable, Sendable {
/// Socket Adress
case address(SocketAddress)
/// Host and port
Expand Down
4 changes: 2 additions & 2 deletions Sources/NIOSOCKS/Messages/SOCKSResponse.swift
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ import NIOCore

/// The SOCKS Server's response to the client's request
/// indicating if the request succeeded or failed.
public struct SOCKSResponse: Hashable, NIOSendable {
public struct SOCKSResponse: Hashable, Sendable {

/// The SOCKS protocol version - we currently only support v5.
public let version: UInt8 = 5
Expand Down Expand Up @@ -69,7 +69,7 @@ extension ByteBuffer {

/// Used to indicate if the SOCKS client's connection request succeeded
/// or failed.
public struct SOCKSServerReply: Hashable, NIOSendable {
public struct SOCKSServerReply: Hashable, Sendable {

/// The connection succeeded and data can now be transmitted.
public static let succeeded = SOCKSServerReply(value: 0x00)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ import NIOCore
/// Used by the SOCKS server to inform the client which
/// authentication method it would like to use out of those
/// offered.
public struct SelectedAuthenticationMethod: Hashable, NIOSendable {
public struct SelectedAuthenticationMethod: Hashable, Sendable {

/// The SOCKS protocol version - we currently only support v5.
public let version: UInt8 = 5
Expand Down

0 comments on commit d373eaf

Please sign in to comment.