From 213ded5f3d0378b14f5a4bffde2b61cc45087688 Mon Sep 17 00:00:00 2001 From: David Evans Date: Mon, 7 Jun 2021 10:45:00 +0100 Subject: [PATCH] Make ClientGreeting internal --- Sources/NIOSOCKS/Messages/ClientGreeting.swift | 18 +++--------------- 1 file changed, 3 insertions(+), 15 deletions(-) diff --git a/Sources/NIOSOCKS/Messages/ClientGreeting.swift b/Sources/NIOSOCKS/Messages/ClientGreeting.swift index e9fdfcf..3927c4f 100644 --- a/Sources/NIOSOCKS/Messages/ClientGreeting.swift +++ b/Sources/NIOSOCKS/Messages/ClientGreeting.swift @@ -14,21 +14,9 @@ import NIO -/// The SOCKS handshake begins with the client sending a greeting -/// containing supported authentication methods. -public struct ClientGreeting: Hashable { - - /// The SOCKS protocol version - we currently only support v5. - public let version: UInt8 = 5 - - /// The client's supported authentication methods, defined in RFC 1928. - public var methods: [AuthenticationMethod] - - /// Creates a new client greeting with the given authentication methods. - /// - parameter methods: The client's supported authentication methods. - public init(methods: [AuthenticationMethod]) { - self.methods = methods - } +struct ClientGreeting: Hashable { + let version: UInt8 = 5 + var methods: [AuthenticationMethod] } extension ByteBuffer {