Adopted the standard withCString for C strings throughout the library.
This commit is contained in:
@@ -30,7 +30,7 @@ extension Network {
|
||||
/// Creates a connection to `server`. Fails if access has not been
|
||||
/// granted. Call `open(_:)` to connect.
|
||||
public init?(server: String, port: Int, useSSL: Bool = true) {
|
||||
let pointer = server.withPlaydateCString {
|
||||
let pointer = server.withCString {
|
||||
tcpAPI.pointee.newConnection.unsafelyUnwrapped($0, Int32(port), useSSL)
|
||||
}
|
||||
guard let pointer else { return nil }
|
||||
|
||||
Reference in New Issue
Block a user