mirror of
https://github.com/HaishinKit/HaishinKit.swift.git
synced 2026-05-07 20:12:28 +00:00
22 lines
479 B
Swift
22 lines
479 B
Swift
import Foundation
|
|
|
|
public struct RTCIceCandidate: Sendable {
|
|
let candidate: String
|
|
let mid: String
|
|
}
|
|
|
|
extension RTCIceCandidate {
|
|
init(candidate: UnsafePointer<CChar>?, mid: UnsafePointer<CChar>?) {
|
|
if let candidate {
|
|
self.candidate = String(cString: candidate)
|
|
} else {
|
|
self.candidate = ""
|
|
}
|
|
if let mid {
|
|
self.mid = String(cString: mid)
|
|
} else {
|
|
self.mid = ""
|
|
}
|
|
}
|
|
}
|