Skip to content

Commit d373eaf

Browse files
authored
Replace NIOSendable with Sendable (#181)
1 parent e9ed606 commit d373eaf

11 files changed

+15
-15
lines changed

Sources/NIOExtras/NIOLengthFieldBitLength.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
import NIOCore
1616

1717
/// A struct to describe the length of a piece of data in bits
18-
public struct NIOLengthFieldBitLength: NIOSendable {
18+
public struct NIOLengthFieldBitLength: Sendable {
1919
internal enum Backing {
2020
case bits8
2121
case bits16

Sources/NIOExtras/QuiescingHelper.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -256,6 +256,6 @@ public final class ServerQuiescingHelper {
256256
}
257257
}
258258

259-
extension ServerQuiescingHelper: NIOSendable {
259+
extension ServerQuiescingHelper: Sendable {
260260

261261
}

Sources/NIOHTTPCompression/HTTPCompression.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ import NIOCore
1919
public enum NIOCompression {
2020

2121
/// Which algorithm should be used for compression.
22-
public struct Algorithm: CustomStringConvertible, Equatable, NIOSendable {
22+
public struct Algorithm: CustomStringConvertible, Equatable, Sendable {
2323
fileprivate enum AlgorithmEnum: String {
2424
case gzip
2525
case deflate

Sources/NIOHTTPCompression/HTTPDecompression.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ import NIOCore
1818
/// Namespace for decompression code.
1919
public enum NIOHTTPDecompression {
2020
/// Specifies how to limit decompression inflation.
21-
public struct DecompressionLimit: NIOSendable {
21+
public struct DecompressionLimit: Sendable {
2222
private enum Limit {
2323
case none
2424
case size(Int)

Sources/NIOSOCKS/Channel Handlers/SOCKSClientHandler.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -212,7 +212,7 @@ extension SOCKSClientHandler: RemovableChannelHandler {
212212
/// A `Channel` user event that is sent when a SOCKS connection has been established
213213
///
214214
/// After this event has been received it is save to remove the `SOCKSClientHandler` from the channel pipeline.
215-
public struct SOCKSProxyEstablishedEvent: NIOSendable {
215+
public struct SOCKSProxyEstablishedEvent: Sendable {
216216
public init() {
217217
}
218218
}

Sources/NIOSOCKS/Messages/AuthenticationMethod.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
import NIOCore
1616

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

2020
/// No authentication required
2121
public static let noneRequired = AuthenticationMethod(value: 0x00)

Sources/NIOSOCKS/Messages/ClientGreeting.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ import NIOCore
1717
/// Clients begin the SOCKS handshake process
1818
/// by providing an array of suggested authentication
1919
/// methods.
20-
public struct ClientGreeting: Hashable, NIOSendable {
20+
public struct ClientGreeting: Hashable, Sendable {
2121

2222
/// The protocol version.
2323
public let version: UInt8 = 5

Sources/NIOSOCKS/Messages/Messages.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
import NIOCore
1616

1717
/// Sent by the client and received by the server.
18-
public enum ClientMessage: Hashable, NIOSendable {
18+
public enum ClientMessage: Hashable, Sendable {
1919

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

3030
/// Sent by the server and received by the client.
31-
public enum ServerMessage: Hashable, NIOSendable {
31+
public enum ServerMessage: Hashable, Sendable {
3232

3333
/// Used by the server to instruct the client of the authentication method to use.
3434
case selectedAuthenticationMethod(SelectedAuthenticationMethod)

Sources/NIOSOCKS/Messages/SOCKSRequest.swift

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ import NIOCore
2424

2525
/// Instructs the SOCKS proxy server of the target host,
2626
/// and how to connect.
27-
public struct SOCKSRequest: Hashable, NIOSendable {
27+
public struct SOCKSRequest: Hashable, Sendable {
2828

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

7676
/// What type of connection the SOCKS server should establish with
7777
/// the target host.
78-
public struct SOCKSCommand: Hashable, NIOSendable {
78+
public struct SOCKSCommand: Hashable, Sendable {
7979

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

101101
/// The address used to connect to the target host.
102-
public enum SOCKSAddress: Hashable, NIOSendable {
102+
public enum SOCKSAddress: Hashable, Sendable {
103103
/// Socket Adress
104104
case address(SocketAddress)
105105
/// Host and port

Sources/NIOSOCKS/Messages/SOCKSResponse.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ import NIOCore
1818

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

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

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

7474
/// The connection succeeded and data can now be transmitted.
7575
public static let succeeded = SOCKSServerReply(value: 0x00)

0 commit comments

Comments
 (0)