in Swift/KVSiOSApp/SignalingClient.swift [58:74]
func sendIceCandidate(rtcIceCandidate: RTCIceCandidate, master: Bool,
recipientClientId: String,
senderClientId: String) {
do {
debugPrint("Sending ICE candidate \(rtcIceCandidate)")
let message: Message = Message.createIceCandidateMessage(candidate: rtcIceCandidate,
master,
recipientClientId: recipientClientId,
senderClientId: senderClientId)
let data = try encoder.encode(message)
let msg = String(data: data, encoding: .utf8)!
socket.write(string: msg)
print("Sent ICE candidate message over to signaling:", msg)
} catch {
print(error)
}
}