Improved logging

This commit is contained in:
Leon Böttger committed 2025-07-27 16:01:35 +02:00
1 parent 77657ece73
commit af5ff5e4fe
3 files changed
+27 -3

No files matched your search

+2 -1
View File
@@ -25,6 +25,7 @@ class NearbyConnection {
var remoteDeviceInfo: RemoteDeviceInfo?
var encryptionDone: Bool = false
var lastError: Error?
var bytesTransferred: Int64 = 0
private var payloadBuffers: [Int64: NSMutableData] = [:]
private var connectionClosed: Bool = false
@@ -382,7 +383,7 @@ class NearbyConnection {
}
else if offlineFrame.hasV1, offlineFrame.v1.hasType, case .keepAlive = offlineFrame.v1.type {
log("[NearbyConnection] Sent keep-alive")
log("[NearbyConnection] Sent keep-alive, \(self.bytesTransferred) bytes sent")
sendKeepAlive(ack: true)
} else {