Reputation: 23
I have developed an android client application and a windows c++ server application which communicate with tcp/ip in a local network.
The data exchange works well on my laptop (win 8, connected to the network with wifi). On my second pc (win 7) the incoming messages are collected and forwarded in a bunch of about 20 messages to my application. As a consequence I only get about two times per second updates of the current sensor data (on the laptop ~30 times per second).
Both computers and the android phone are in the same local network. There are no other devices in the network and it is not connected to the internet. I already tried a wifi connection and a lan connection for the second pc without noticeable differences. I assume that any windows 7 setting is responsible for this behavior.
Upvotes: 2
Views: 165
Reputation: 171206
You are using nagling which batches small sends for 200ms. Disable it, but make sure to send big chunks at a time. Each send call immediately goes on the network now.
Upvotes: 1