linux - Flushing tx udp socket kernel buffers to reduce latency -


i have linux based wireless network application requires pretty hard on latency. i.e., late arrival of data packet no better @ compared no data. also, old data in socket can delay newer data.

i'm looking if transmit side there way detect socket piling old data , in such case flush/discard , send fresh data.

i know receiver can read of old data , discard. however, still play catch , not in speeding if there sender side option evaluate.

thanks help.

try turning off nagle algorithm on sending side. algorithm tries collect smaller packets larger ones reduce overhead, turning off can mean each packet sent immediately. here's code snippet turn off:

void nonagle (int socket) {         int on = 1;         if (setsockopt (socket, ipproto_tcp, tcp_nodelay, &on, sizeof(on)) < 0)             bye ("can not disable nagle algorithm\n"); } 

Comments

Popular posts from this blog

javascript - Slick Slider width recalculation -

jsf - PrimeFaces Datatable - What is f:facet actually doing? -

angular2 services - Angular 2 RC 4 Http post not firing -