SetSockOpt, NO_DELAY and buffering
-
Hello. I have a problem sending packets at the right time. My app sends a packet (16-100kbytes) each 10 seconds... but they are paired up and received as 2 packets each 20 seconds. I used setsockopt with no_delay set to 1 and it didn't help. My send buffer is 8192 bytes, I use win98 and winsock 1.1 How can I force winsock to send each packet separately ? Any help would be appreciated...:)
-
Hello. I have a problem sending packets at the right time. My app sends a packet (16-100kbytes) each 10 seconds... but they are paired up and received as 2 packets each 20 seconds. I used setsockopt with no_delay set to 1 and it didn't help. My send buffer is 8192 bytes, I use win98 and winsock 1.1 How can I force winsock to send each packet separately ? Any help would be appreciated...:)
Hi, Actually, it might be that the packets are buffered and sent when buffer is full (normal behavior).. So you have to flush the data from the buffer so that it writes the data. Sameer
-
Hi, Actually, it might be that the packets are buffered and sent when buffer is full (normal behavior).. So you have to flush the data from the buffer so that it writes the data. Sameer
-
Yes, that's what I am trying to do... Do you know how to flush the data using windows sockets 1.1 ? I think I should switch to winsock version 2.2, there is a SIO_FLUSH command in WSAIoctl()... anyone used that with positive outcome ?
Winsock buffers data, but does not wait as long as 10 seconds (by default, it's buffering time, i.e. the time it waits for more data before flushing to the net, is 100 ms.) So I'd say the problem is somewhere else. Joaquín M López Muñoz Telefónica, Investigación y Desarrollo
-
Winsock buffers data, but does not wait as long as 10 seconds (by default, it's buffering time, i.e. the time it waits for more data before flushing to the net, is 100 ms.) So I'd say the problem is somewhere else. Joaquín M López Muñoz Telefónica, Investigación y Desarrollo