I get the file path from document directory and read that file in chunks of 1024 and save (append) to NSMutableData object or you can directly write to socket.
// MARK: - Get file data as chunks Methode.
func getFileDataInChunks() {
let doumentDirectoryPath = NSSearchPathForDirectoriesI...