TCP latency

I am interested what can I expect from an iPad mini 4. I send 100 bytes from an iot devie to the ipad every 100 ms (over wifi, local network, tcp), and it works most of the times, but I can notice that like every minutes ones/twice the packages gets congested and some of the packeges I got late, and got together not 100 bytes, but 200 bytes. Or 3 or 400 or even 1200 bytes. And my timeframes skips...

So I do not lose any data/messages, only somehow the ipad gets a few packages later, and the packages add up, and got 2-12 messages together.


I have read the following article, and tried to find the problem.

https://forums.developer.apple.com/thread/45210


I have tried with different types of routers, but the problem exists on all devices.

However it would be great to know what are the IOS/ipad limitations, because I think sending 100 bytes every 100ms it is not a big volume of data.


I have used the code from this post:

https://forums.developer.apple.com/thread/84472


The actual testing code is:

import UIKit

extension Stream {
    static func streamsToHost(name hostname: String, port: Int) -> (inputStream: InputStream, outputStream: OutputStream) {
        var inStream: InputStream? = nil
        var outStream: OutputStream? = nil
        Stream.getStreamsToHost(withName: hostname, port: port, inputStream: &inStream, outputStream: &outStream)
        return (inStream!, outStream!)
    }
}

class ViewController: UIViewController, StreamDelegate {
    let expected_package_size = 100
    
    let formatter = DateFormatter()
    var Timestamp: Double {
        return Date().timeIntervalSince1970 * 1000
    }
    var last_received: Double = 0
    var msg_counter:Int32 = 0
    var wrong_counter:Int32 = 0
    var sampleTextField2 = UITextField(frame: CGRect(x: 20, y: 150, width: 300, height: 40))
    var sampleTextField3 = UITextField(frame: CGRect(x: 20, y: 200, width: 900, height: 40))
    
    
    override func viewDidLoad() {
        super.viewDidLoad()
        formatter.dateFormat = "HH:mm:ss.SSS"
        
        streamTest()
        sampleTextField2.borderStyle = UITextField.BorderStyle.roundedRect
        self.view.addSubview(sampleTextField2)
        sampleTextField3.borderStyle = UITextField.BorderStyle.roundedRect
        self.view.addSubview(sampleTextField3)
    }
    
    
    override func viewWillDisappear(_ animated: Bool) {
        super.viewWillDisappear(animated)
        if let streams = self.streams {
            self.stop(streams: streams)
        }
        
    }
    
    var streams: (inputStream: InputStream, outputStream: OutputStream)? = nil
    var ping = Data()
    
    func streamTest() {
        if let streams = self.streams {
            print("stream stop")
            self.stop(streams: streams)
        } else {
            print("stream start")
             self.start(name: "192.168.1.111", port: 3456, tls: false, ping: "Hello Cruel World!\r\n")
        }
    }
    
    func pingTest() {
        if let streams = self.streams {
            print("stream ping")
            self.ping(streams: streams)
        } else {
            print("stream ping while not connected")
        }
    }
    
    func start(name: String, port: Int, tls: Bool, ping: String) {
        self.ping = ping.data(using: .utf8)!
        let streams = Stream.streamsToHost(name: name, port: port)
        self.streams = streams
        
        if tls {
            let success = streams.inputStream.setProperty(StreamSocketSecurityLevel.negotiatedSSL as AnyObject, forKey: Stream.PropertyKey.socketSecurityLevelKey)
            precondition(success)
        }
        
        for s in [streams.inputStream, streams.outputStream] {
            s.schedule(in: .current, forMode: .default)
            s.delegate = self
            s.open()
        }
    }
    
    func ping(streams: (inputStream: InputStream, outputStream: OutputStream)) {
        let data = self.ping
        let dataCount = data.count
        let bytesWritten = data.withUnsafeBytes { (p: UnsafePointer<UInt8>) -> Int in
            return streams.outputStream.write(p, maxLength: dataCount)
        }
        if bytesWritten < 0 {
            print("stream write error")
        } else if bytesWritten < data.count {
            print("stream write short %d / %d", bytesWritten, data.count)
        } else {
            print("stream task write %@", data as NSData)
        }
    }
    
    func stop(streams: (inputStream: InputStream, outputStream: OutputStream)) {
        for s in [streams.inputStream, streams.outputStream] {
            s.delegate  = nil
            s.close()
        }
        self.streams = nil
    }
    
    func stream(_ thisStream: Stream, handle eventCode: Stream.Event) {
        guard let streams = self.streams else { fatalError() }
        let streamName = thisStream == streams.inputStream ? " input" : "output"
        switch eventCode {
        case [.openCompleted]:
            print("%@ stream did open", streamName as NSString)
            break
        case [.hasBytesAvailable]:
            var temp: Double = Timestamp
            var diff: Double = temp - last_received
            if (temp - last_received > 180) {
                print("timeframe error: ",  Int(diff))
            }
            last_received = temp

            var buffer = [UInt8](repeating: 0, count: 2024)
            let bytesRead = streams.inputStream.read(&buffer, maxLength: buffer.count)
            if bytesRead > 0 {
                msg_counter += 1
                if (bytesRead != expected_package_size) {
                    wrong_counter += 1
                    print("package size error counter: ", wrong_counter, " length: ", bytesRead, " messages: ", bytesRead / 86)
                }
                let data = NSData(bytes: &buffer, length: bytesRead)
                let str = NSString(data: data as Data, encoding: String.Encoding.utf8.rawValue)! as String
               // sampleTextField2.text = String(msg_counter)
               // sampleTextField3.text = String(wrong_counter)
                print(formatter.string(from: Date()), " ", str, " ",  bytesRead, " ", msg_counter, "\t",wrong_counter,"\t",Int(diff))
            }
        case [.hasSpaceAvailable]:
            print("%@ stream has space", streamName as NSString)
        case [.endEncountered]:
            print("%@ stream end", streamName)
            self.stop(streams: streams)
        case [.errorOccurred]:
            let error = thisStream.streamError! as NSError
            print("%@ stream error %@ / %d", streamName, error.domain, error.code)
            self.stop(streams: streams)
        default:
            fatalError()
        }
    }

Thanks for any help!

I can notice that like every minutes ones/twice the packages gets congested and some of the packeges I got late, and got together not 100 bytes, but 200 bytes. Or 3 or 400 or even 1200 bytes.

What do you mean by “packages” in this sentence? Do you mean packets on the ‘wire’, as shown by RVI? Or are you referring to the chunks of data returned by

NSStream
?

Share and Enjoy

Quinn “The Eskimo!”
Apple Developer Relations, Developer Technical Support, Core OS/Hardware

let myEmail = "eskimo" + "1" + "@apple.com"

Hello Eskimo,


I mean by package "100 bytes of data" that I send every 100 ms from my IOT device. (Photon from Particle).

I have read a little bit more about it. I think the problem is the delayed ACK (receiver side iPad) and Nagle's algorithm/tcp_nodelay (sender side, Photon).

I have tried to send more data at once like 2048 bytes (every 100ms), but I have noticed, that iPad lot of times receives only 1152 bytes and the rest bytes few ms later. After I changed the "packet size" to 1152 bytes (so I send every 100ms 1152 bytes), which is probably the Photon's max buffer size, and then I see only like 300 ms delay maximum (maximum 3 1152 bytes data I got together), not more on the iPad/at the receiver side. Is that possible that the iPads max buffer size is 1448 and the delayed ACK algorithm waits to come new data?

I tried to use the swiftsocket library, and change to

" setsockopt(socketfd, SOL_SOCKET, TCP_NODELAY, &reuseon, sizeof(reuseon));"


Which of course does not make any change, because tcp_nodelay would make effect when I send data from iPad. I have tried TCP_QUICKACK flag but got the following error. "Use of undeclared identifier 'TCP_QUICKACK'".


Thanks for any help!

Have you looked at a packet trace for this? If the problem is the Nagle algorithm on the send side that should be visible in the packet trace, that is, you should see the sender not send the data immediately but rather delay and coalesce multiple chunks of data.

Share and Enjoy

Quinn “The Eskimo!”
Apple Developer Relations, Developer Technical Support, Core OS/Hardware

let myEmail = "eskimo" + "1" + "@apple.com"

Thanks for the tip!

I have tried with wiresharp and found the followings. I can see the problem at line 20 but I am not sure the problem with the sender or the receiver side.

  11211 747.467816     192.168.1.228         192.168.1.111         TCP      54     58464 → 3456 [ACK] Seq=1 Ack=2256769 Win=65535 Len=0
  11212 747.567642     192.168.1.111         192.168.1.228         TCP      1206   3456 → 58464 [PSH, ACK] Seq=2256769 Ack=1 Win=4608 Len=1152
  11213 747.567713     192.168.1.228         192.168.1.111         TCP      54     58464 → 3456 [ACK] Seq=1 Ack=2257921 Win=65535 Len=0
  11214 747.667795     192.168.1.111         192.168.1.228         TCP      1206   3456 → 58464 [PSH, ACK] Seq=2257921 Ack=1 Win=4608 Len=1152
  11215 747.667910     192.168.1.228         192.168.1.111         TCP      54     58464 → 3456 [ACK] Seq=1 Ack=2259073 Win=65535 Len=0
  11216 747.767606     192.168.1.111         192.168.1.228         TCP      1206   3456 → 58464 [PSH, ACK] Seq=2259073 Ack=1 Win=4608 Len=1152
  11217 747.767683     192.168.1.228         192.168.1.111         TCP      54     58464 → 3456 [ACK] Seq=1 Ack=2260225 Win=65535 Len=0
  11218 747.867563     192.168.1.111         192.168.1.228         TCP      1206   3456 → 58464 [PSH, ACK] Seq=2260225 Ack=1 Win=4608 Len=1152
  11219 747.867650     192.168.1.228         192.168.1.111         TCP      54     58464 → 3456 [ACK] Seq=1 Ack=2261377 Win=65535 Len=0
  11220 747.967691     192.168.1.111         192.168.1.228         TCP      1206   3456 → 58464 [PSH, ACK] Seq=2261377 Ack=1 Win=4608 Len=1152
  11221 747.967823     192.168.1.228         192.168.1.111         TCP      54     58464 → 3456 [ACK] Seq=1 Ack=2262529 Win=65535 Len=0
  11222 748.067739     192.168.1.111         192.168.1.228         TCP      1206   3456 → 58464 [PSH, ACK] Seq=2262529 Ack=1 Win=4608 Len=1152
  11223 748.067853     192.168.1.228         192.168.1.111         TCP      54     58464 → 3456 [ACK] Seq=1 Ack=2263681 Win=65535 Len=0
  11224 748.167757     192.168.1.111         192.168.1.228         TCP      1206   3456 → 58464 [PSH, ACK] Seq=2263681 Ack=1 Win=4608 Len=1152
  11225 748.167870     192.168.1.228         192.168.1.111         TCP      54     58464 → 3456 [ACK] Seq=1 Ack=2264833 Win=65535 Len=0
  11226 748.267863     192.168.1.111         192.168.1.228         TCP      1206   3456 → 58464 [PSH, ACK] Seq=2264833 Ack=1 Win=4608 Len=1152
  11227 748.267974     192.168.1.228         192.168.1.111         TCP      54     58464 → 3456 [ACK] Seq=1 Ack=2265985 Win=65535 Len=0
  11228 748.369571     192.168.1.111         192.168.1.228         TCP      1206   3456 → 58464 [PSH, ACK] Seq=2265985 Ack=1 Win=4608 Len=1152
  11229 748.369637     192.168.1.228         192.168.1.111         TCP      54     58464 → 3456 [ACK] Seq=1 Ack=2267137 Win=65535 Len=0
  11230 748.999914     192.168.1.111         192.168.1.228         TCP      1206   3456 → 58464 [PSH, ACK] Seq=2267137 Ack=1 Win=4608 Len=1152
  11231 748.999917     192.168.1.111         192.168.1.228         TCP      1206   3456 → 58464 [PSH, ACK] Seq=2268289 Ack=1 Win=4608 Len=1152
  11232 748.999918     192.168.1.111         192.168.1.228         TCP      1206   3456 → 58464 [PSH, ACK] Seq=2269441 Ack=1 Win=4608 Len=1152
  11233 748.999919     192.168.1.111         192.168.1.228         TCP      1206   3456 → 58464 [PSH, ACK] Seq=2270593 Ack=1 Win=4608 Len=1152
  11234 748.999920     192.168.1.111         192.168.1.228         TCP      1206   3456 → 58464 [PSH, ACK] Seq=2271745 Ack=1 Win=4608 Len=1152
  11235 748.999932     192.168.1.111         192.168.1.228         TCP      1206   3456 → 58464 [PSH, ACK] Seq=2272897 Ack=1 Win=4608 Len=1152
  11236 749.000033     192.168.1.228         192.168.1.111         TCP      54     58464 → 3456 [ACK] Seq=1 Ack=2268289 Win=65535 Len=0
  11237 749.000034     192.168.1.228         192.168.1.111         TCP      54     58464 → 3456 [ACK] Seq=1 Ack=2269441 Win=65535 Len=0
  11238 749.000034     192.168.1.228         192.168.1.111         TCP      54     58464 → 3456 [ACK] Seq=1 Ack=2270593 Win=65535 Len=0
  11239 749.000034     192.168.1.228         192.168.1.111         TCP      54     58464 → 3456 [ACK] Seq=1 Ack=2271745 Win=65535 Len=0
  11240 749.000034     192.168.1.228         192.168.1.111         TCP      54     58464 → 3456 [ACK] Seq=1 Ack=2272897 Win=65535 Len=0
  11241 749.000034     192.168.1.228         192.168.1.111         TCP      54     58464 → 3456 [ACK] Seq=1 Ack=2274049 Win=65535 Len=0
  11242 749.518575     192.168.1.111         192.168.1.228         TCP      1206   3456 → 58464 [PSH, ACK] Seq=2274049 Ack=1 Win=4608 Len=1152
  11243 749.518578     192.168.1.111         192.168.1.228         TCP      1206   3456 → 58464 [PSH, ACK] Seq=2275201 Ack=1 Win=4608 Len=1152
  11244 749.518579     192.168.1.111         192.168.1.228         TCP      1206   3456 → 58464 [PSH, ACK] Seq=2276353 Ack=1 Win=4608 Len=1152
  11245 749.518683     192.168.1.111         192.168.1.228         TCP      1206   3456 → 58464 [PSH, ACK] Seq=2277505 Ack=1 Win=4608 Len=1152
  11246 749.518686     192.168.1.111         192.168.1.228         TCP      1206   3456 → 58464 [PSH, ACK] Seq=2278657 Ack=1 Win=4608 Len=1152
  11247 749.518738     192.168.1.228         192.168.1.111         TCP      54     58464 → 3456 [ACK] Seq=1 Ack=2275201 Win=65535 Len=0
  11248 749.518738     192.168.1.228         192.168.1.111         TCP      54     58464 → 3456 [ACK] Seq=1 Ack=2276353 Win=65535 Len=0
  11249 749.518738     192.168.1.228         192.168.1.111         TCP      54     58464 → 3456 [ACK] Seq=1 Ack=2277505 Win=65535 Len=0
  11250 749.518738     192.168.1.228         192.168.1.111         TCP      54     58464 → 3456 [ACK] Seq=1 Ack=2278657 Win=65535 Len=0
  11251 749.518739     192.168.1.228         192.168.1.111         TCP      54     58464 → 3456 [ACK] Seq=1 Ack=2279809 Win=65535 Len=0
  11252 750.148572     192.168.1.111         192.168.1.228         TCP      1206   3456 → 58464 [PSH, ACK] Seq=2279809 Ack=1 Win=4608 Len=1152
  11253 750.148575     192.168.1.111         192.168.1.228         TCP      1206   3456 → 58464 [PSH, ACK] Seq=2280961 Ack=1 Win=4608 Len=1152
  11254 750.148577     192.168.1.111         192.168.1.228         TCP      1206   3456 → 58464 [PSH, ACK] Seq=2282113 Ack=1 Win=4608 Len=1152
  11255 750.148627     192.168.1.228         192.168.1.111         TCP      54     58464 → 3456 [ACK] Seq=1 Ack=2280961 Win=65535 Len=0
  11256 750.148627     192.168.1.228         192.168.1.111         TCP      54     58464 → 3456 [ACK] Seq=1 Ack=2282113 Win=65535 Len=0
  11257 750.148627     192.168.1.228         192.168.1.111         TCP      54     58464 → 3456 [ACK] Seq=1 Ack=2283265 Win=65535 Len=0
  11258 750.148742     192.168.1.111         192.168.1.228         TCP      1206   3456 → 58464 [PSH, ACK] Seq=2283265 Ack=1 Win=4608 Len=1152
  11259 750.148746     192.168.1.111         192.168.1.228         TCP      1206   3456 → 58464 [PSH, ACK] Seq=2284417 Ack=1 Win=4608 Len=1152
  11260 750.148776     192.168.1.228         192.168.1.111         TCP      54     58464 → 3456 [ACK] Seq=1 Ack=2284417 Win=65535 Len=0
  11261 750.148776     192.168.1.228         192.168.1.111         TCP      54     58464 → 3456 [ACK] Seq=1 Ack=2285569 Win=65535 Len=0
  11262 750.148865     192.168.1.111         192.168.1.228         TCP      1206   3456 → 58464 [PSH, ACK] Seq=2285569 Ack=1 Win=4608 Len=1152
  11263 750.148902     192.168.1.228         192.168.1.111         TCP      54     58464 → 3456 [ACK] Seq=1 Ack=2286721 Win=65535 Len=0
  11264 750.884487     192.168.1.111         192.168.1.228         TCP      1206   3456 → 58464 [PSH, ACK] Seq=2286721 Ack=1 Win=4608 Len=1152
  11265 750.884490     192.168.1.111         192.168.1.228         TCP      1206   3456 → 58464 [PSH, ACK] Seq=2287873 Ack=1 Win=4608 Len=1152
  11266 750.884491     192.168.1.111         192.168.1.228         TCP      1206   3456 → 58464 [PSH, ACK] Seq=2289025 Ack=1 Win=4608 Len=1152
  11267 750.884538     192.168.1.228         192.168.1.111         TCP      54     58464 → 3456 [ACK] Seq=1 Ack=2287873 Win=65535 Len=0
  11268 750.884538     192.168.1.228         192.168.1.111         TCP      54     58464 → 3456 [ACK] Seq=1 Ack=2289025 Win=65535 Len=0
  11269 750.884539     192.168.1.228         192.168.1.111         TCP      54     58464 → 3456 [ACK] Seq=1 Ack=2290177 Win=65535 Len=0
  11270 750.885749     192.168.1.111         192.168.1.228         TCP      1206   3456 → 58464 [PSH, ACK] Seq=2290177 Ack=1 Win=4608 Len=1152
  11271 750.885751     192.168.1.111         192.168.1.228         TCP      1206   3456 → 58464 [PSH, ACK] Seq=2291329 Ack=1 Win=4608 Len=1152
  11272 750.885752     192.168.1.111         192.168.1.228         TCP      1206   3456 → 58464 [PSH, ACK] Seq=2292481 Ack=1 Win=4608 Len=1152
  11273 750.885937     192.168.1.228         192.168.1.111         TCP      54     58464 → 3456 [ACK] Seq=1 Ack=2291329 Win=65535 Len=0
  11274 750.885937     192.168.1.228         192.168.1.111         TCP      54     58464 → 3456 [ACK] Seq=1 Ack=2292481 Win=65535 Len=0
  11275 750.885937     192.168.1.228         192.168.1.111         TCP      54     58464 → 3456 [ACK] Seq=1 Ack=2293633 Win=65535 Len=0
  11276 751.084587     192.168.1.228         224.0.0.251           MDNS     94     Standard query response 0x0000 A, cache flush 192.168.1.228
  11277 751.624134     192.168.1.111         192.168.1.228         TCP      1206   3456 → 58464 [PSH, ACK] Seq=2293633 Ack=1 Win=4608 Len=1152
  11278 751.624137     192.168.1.111         192.168.1.228         TCP      1206   3456 → 58464 [PSH, ACK] Seq=2294785 Ack=1 Win=4608 Len=1152
  11279 751.625982     192.168.1.111         192.168.1.228         TCP      1206   3456 → 58464 [PSH, ACK] Seq=2295937 Ack=1 Win=4608 Len=1152
  11280 751.625985     192.168.1.111         192.168.1.228         TCP      1206   3456 → 58464 [PSH, ACK] Seq=2297089 Ack=1 Win=4608 Len=1152
  11281 751.625995     192.168.1.228         192.168.1.111         TCP      54     58464 → 3456 [ACK] Seq=1 Ack=2294785 Win=65535 Len=0
  11282 751.625995     192.168.1.228         192.168.1.111         TCP      54     58464 → 3456 [ACK] Seq=1 Ack=2295937 Win=65535 Len=0
  11283 751.626036     192.168.1.228         192.168.1.111         TCP      54     58464 → 3456 [ACK] Seq=1 Ack=2297089 Win=65535 Len=0
  11284 751.626036     192.168.1.228         192.168.1.111         TCP      54     58464 → 3456 [ACK] Seq=1 Ack=2298241 Win=65535 Len=0
  11285 751.628168     192.168.1.111         192.168.1.228         TCP      1206   3456 → 58464 [PSH, ACK] Seq=2298241 Ack=1 Win=4608 Len=1152
  11286 751.636852     192.168.1.228         192.168.1.111         TCP      54     58464 → 3456 [ACK] Seq=1 Ack=2299393 Win=65535 Len=0
  11287 751.783781     192.168.1.228         224.0.0.251           MDNS     90     Standard query response 0x0000 A, cache flush 169.254.102.64
  11288 752.363757     192.168.1.111         192.168.1.228         TCP      1206   3456 → 58464 [PSH, ACK] Seq=2299393 Ack=1 Win=4608 Len=1152
  11289 752.363760     192.168.1.111         192.168.1.228         TCP      1206   3456 → 58464 [PSH, ACK] Seq=2300545 Ack=1 Win=4608 Len=1152
  11290 752.363830     192.168.1.228         192.168.1.111         TCP      54     58464 → 3456 [ACK] Seq=1 Ack=2300545 Win=65535 Len=0
  11291 752.363830     192.168.1.228         192.168.1.111         TCP      54     58464 → 3456 [ACK] Seq=1 Ack=2301697 Win=65535 Len=0
  11292 752.364072     192.168.1.111         192.168.1.228         TCP      1206   3456 → 58464 [PSH, ACK] Seq=2301697 Ack=1 Win=4608 Len=1152
  11293 752.364106     192.168.1.228         192.168.1.111         TCP      54     58464 → 3456 [ACK] Seq=1 Ack=2302849 Win=65535 Len=0
  11294 752.364786     192.168.1.111         192.168.1.228         TCP      1206   3456 → 58464 [PSH, ACK] Seq=2302849 Ack=1 Win=4608 Len=1152
  11295 752.364815     192.168.1.228         192.168.1.111         TCP      54     58464 → 3456 [ACK] Seq=1 Ack=2304001 Win=65535 Len=0
  11296 752.364998     192.168.1.111         192.168.1.228         TCP      1206   3456 → 58464 [PSH, ACK] Seq=2304001 Ack=1 Win=4608 Len=1152
  11297 752.365028     192.168.1.228         192.168.1.111         TCP      54     58464 → 3456 [ACK] Seq=1 Ack=2305153 Win=65535 Len=0
  11298 752.620714     192.168.1.111         192.168.1.228         TCP      1206   3456 → 58464 [PSH, ACK] Seq=2305153 Ack=1 Win=4608 Len=1152
  11299 752.620717     192.168.1.111         192.168.1.228         TCP      1206   3456 → 58464 [PSH, ACK] Seq=2306305 Ack=1 Win=4608 Len=1152
  11300 752.620718     192.168.1.111         192.168.1.228         TCP      1206   3456 → 58464 [PSH, ACK] Seq=2307457 Ack=1 Win=4608 Len=1152
  11301 752.620767     192.168.1.228         192.168.1.111         TCP      54     58464 → 3456 [ACK] Seq=1 Ack=2306305 Win=65535 Len=0
  11302 752.620767     192.168.1.228         192.168.1.111         TCP      54     58464 → 3456 [ACK] Seq=1 Ack=2307457 Win=65535 Len=0
  11303 752.620768     192.168.1.228         192.168.1.111         TCP      54     58464 → 3456 [ACK] Seq=1 Ack=2308609 Win=65535 Len=0
  11304 752.670851     192.168.1.111         192.168.1.228         TCP      1206   3456 → 58464 [PSH, ACK] Seq=2308609 Ack=1 Win=4608 Len=1152
  11305 752.670953     192.168.1.228         192.168.1.111         TCP      54     58464 → 3456 [ACK] Seq=1 Ack=2309761 Win=65535 Len=0
  11306 752.767837     192.168.1.111         192.168.1.228         TCP      1206   3456 → 58464 [PSH, ACK] Seq=2309761 Ack=1 Win=4608 Len=1152
  11307 752.767951     192.168.1.228         192.168.1.111         TCP      54     58464 → 3456 [ACK] Seq=1 Ack=2310913 Win=65535 Len=0
  11308 752.867875     192.168.1.111         192.168.1.228         TCP      1206   3456 → 58464 [PSH, ACK] Seq=2310913 Ack=1 Win=4608 Len=1152
  11309 752.867948     192.168.1.228         192.168.1.111         TCP      54     58464 → 3456 [ACK] Seq=1 Ack=2312065 Win=65535 Len=0
  11310 753.081164     192.168.1.111         192.168.1.228         TCP      1206   3456 → 58464 [PSH, ACK] Seq=2312065 Ack=1 Win=4608 Len=1152
  11311 753.081169     192.168.1.111         192.168.1.228         TCP      1206   3456 → 58464 [PSH, ACK] Seq=2313217 Ack=1 Win=4608 Len=1152
  11312 753.081264     192.168.1.228         192.168.1.111         TCP      54     58464 → 3456 [ACK] Seq=1 Ack=2313217 Win=65535 Len=0
  11313 753.081264     192.168.1.228         192.168.1.111         TCP      54     58464 → 3456 [ACK] Seq=1 Ack=2314369 Win=65535 Len=0
  11314 753.167958     192.168.1.111         192.168.1.228         TCP      1206   3456 → 58464 [PSH, ACK] Seq=2314369 Ack=1 Win=4608 Len=1152
  11315 753.168075     192.168.1.228         192.168.1.111         TCP      54     58464 → 3456 [ACK] Seq=1 Ack=2315521 Win=65535 Len=0
  11316 753.267624     192.168.1.111         192.168.1.228         TCP      1206   3456 → 58464 [PSH, ACK] Seq=2315521 Ack=1 Win=4608 Len=1152
  11317 753.267738     192.168.1.228         192.168.1.111         TCP      54     58464 → 3456 [ACK] Seq=1 Ack=2316673 Win=65535 Len=0
  11318 753.368183     192.168.1.111         192.168.1.228         TCP      1206   3456 → 58464 [PSH, ACK] Seq=2316673 Ack=1 Win=4608 Len=1152
  11319 753.368295     192.168.1.228         192.168.1.111         TCP      54     58464 → 3456 [ACK] Seq=1 Ack=2317825 Win=65535 Len=0
  11320 753.467719     192.168.1.111         192.168.1.228         TCP      1206   3456 → 58464 [PSH, ACK] Seq=2317825 Ack=1 Win=4608 Len=1152
  11321 753.467796     192.168.1.228         192.168.1.111         TCP      54     58464 → 3456 [ACK] Seq=1 Ack=2318977 Win=65535 Len=0
  11322 753.567595     192.168.1.111         192.168.1.228         TCP      1206   3456 → 58464 [PSH, ACK] Seq=2318977 Ack=1 Win=4608 Len=1152
  11323 753.567702     192.168.1.228         192.168.1.111         TCP      54     58464 → 3456 [ACK] Seq=1 Ack=2320129 Win=65535 Len=0
  11324 753.667891     192.168.1.111         192.168.1.228         TCP      1206   3456 → 58464 [PSH, ACK] Seq=2320129 Ack=1 Win=4608 Len=1152

Sorry but I’m not up for rummaging through packet traces on DevForums. You’re going to have to learn a bit more about how TCP works in order better interpret this trace.

Share and Enjoy

Quinn “The Eskimo!”
Apple Developer Relations, Developer Technical Support, Core OS/Hardware

let myEmail = "eskimo" + "1" + "@apple.com"

Dear Eskimo,


No problem, you help me a lot already! I am going to take your advice, and I try to learn more about it!


Thanks again!

TCP latency
 
 
Q