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() } } }))