File tree Expand file tree Collapse file tree 1 file changed +7
-7
lines changed Expand file tree Collapse file tree 1 file changed +7
-7
lines changed Original file line number Diff line number Diff line change @@ -197,6 +197,13 @@ extension Socket {
197197 }
198198 }
199199
200+ public static func unlink( _ address: sockaddr_un ) throws {
201+ var address = address
202+ guard Socket . unlink ( & address. sun_path. 0 ) == 0 else {
203+ throw SocketError . makeFailed ( " unlink " )
204+ }
205+ }
206+
200207 static func makeAddressINET( fromIP4 ip: String , port: UInt16 ) throws -> sockaddr_in {
201208 var address = Socket . makeAddressINET ( port: port)
202209 address. sin_addr = try Socket . makeInAddr ( fromIP4: ip)
@@ -218,13 +225,6 @@ extension Socket {
218225 }
219226 return addr
220227 }
221-
222- static func unlink( _ address: sockaddr_un ) throws {
223- var address = address
224- guard Socket . unlink ( & address. sun_path. 0 ) == 0 else {
225- throw SocketError . makeFailed ( " unlink " )
226- }
227- }
228228}
229229
230230public struct AnySocketAddress : Sendable , SocketAddress {
You can’t perform that action at this time.
0 commit comments