Files
HaishinKit.swift/RTCHaishinKit/Sources/RTC/RTCIceCandidate.swift
2025-11-11 19:39:57 +09:00

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 = ""
}
}
}