Use Int for port

This commit is contained in:
David Evans 2021-06-07 15:20:32 +01:00
parent d0da3681e5
commit bef17dbb4c

View File

@ -84,7 +84,7 @@ public enum AddressType: Hashable {
case address(SocketAddress)
case domain(String, port: UInt16)
case domain(String, port: Int)
/// How many bytes are needed to represent the address, excluding the port
var size: Int {
@ -155,7 +155,7 @@ extension ByteBuffer {
else {
throw SOCKSError.MissingBytes()
}
return .domain(host, port: UInt16(port))
return .domain(host, port: port)
}
}