1
0
mirror of https://github.com/apple/swift-nio-extras.git synced 2025-05-21 21:09:34 +08:00

Use Int for port

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

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