Post

Replies

Boosts

Views

Activity

Setting TCP_QUICKACK for iOS socket
Hello everyone,I'm using TCP socket for communication between devices in my apps. So far I've been experiencing a latency problem with sending/receiving messages via the socket. According to this topic here http://www.stuartcheshire.org/papers/nagledelayedack/ , the problem might probably due to Nagle Algorithm and Delay ACK.After some research, I'm able to set TCP_NODEDELAY for my socket by using this code:int nodelay_flag = 1;setsockopt(*sock, IPPROTO_TCP, TCP_NODELAY, (void*) &nodelay_flag, sizeof(int))However I still cannot disable Delay ACK. I'm told that TCP_QUICKACK will solve the problem, but when I write this code:int quickack_flag = 1;setsockopt(*sock, IPPROTO_TCP, TCP_QUICKACK, (void*) &quickack_flag, sizeof(int))I got the error from compiler error: "Use of undeclared identifier 'TCP_QUICKACK' ". Can someone please help me with this? Thanks a lot in advance.
3
0
2.9k
May ’19