Post

Replies

Boosts

Views

Activity

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 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() }   } }))
2
0
438
Oct ’20