How to get data sending progress from NWConnection.send(content:Data([UInt8]),_:,_) tcp socket connection in swift

This is the code to send Data over tcp connection
Code Block  
var data = try! Data(contentsOf: uri)
self.con!.send(content:data,contentContext:.finalMessage,isComplete:false,completion:.contentProcessed({ e in
if let error = e{
print("file send error = \(error)")
}else{
print("------ file send Completed -------")
DispatchQueue.main.sync {
self.delegate?.fileSentComplete()
}
  }
}))


How much data are you sending in a single send call?

Share and Enjoy

Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@apple.com"
@eskimo
It could be from a Byte to Gigabytes, for testing I am sending 200 MB file
How to get data sending progress from NWConnection.send(content:Data([UInt8]),_:,_) tcp socket connection in swift
 
 
Q