File tree 1 file changed +7
-7
lines changed
1 file changed +7
-7
lines changed Original file line number Diff line number Diff line change @@ -197,6 +197,13 @@ extension Socket {
197
197
}
198
198
}
199
199
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
+
200
207
static func makeAddressINET( fromIP4 ip: String , port: UInt16 ) throws -> sockaddr_in {
201
208
var address = Socket . makeAddressINET ( port: port)
202
209
address. sin_addr = try Socket . makeInAddr ( fromIP4: ip)
@@ -218,13 +225,6 @@ extension Socket {
218
225
}
219
226
return addr
220
227
}
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
- }
228
228
}
229
229
230
230
public struct AnySocketAddress : Sendable , SocketAddress {
You can’t perform that action at this time.
0 commit comments