how to determine max TCP/IP send size
-
Windows 7, Visual Studio 2010, C++ How can an application determine the maximum size for a single chunk of data to be sent from a server application to a client application on another computer? This is on a private network, not not accessible outside of the control room. There is a switch between the two computers but that is about it. I presume this can be done a run time. My application sends large amounts of telemetry data to a client for display. The goal is to reduce buffering as much as possible. The app uses overlapped I/O with completion events.
Thank you for your time If you work with telemetry, please check this bulletin board: www.irigbb.com
-
Windows 7, Visual Studio 2010, C++ How can an application determine the maximum size for a single chunk of data to be sent from a server application to a client application on another computer? This is on a private network, not not accessible outside of the control room. There is a switch between the two computers but that is about it. I presume this can be done a run time. My application sends large amounts of telemetry data to a client for display. The goal is to reduce buffering as much as possible. The app uses overlapped I/O with completion events.
Thank you for your time If you work with telemetry, please check this bulletin board: www.irigbb.com
-
I am getting back to my application that ingests telemetry data and sends it to a display device. There will be a lot of data and a lot of packets. The data to the display device will be about 4.5 megabytes per second per stream. I think I need the program to have the ability determine the MSS and MTU so it can build the buffers and get them out in the most efficient manner possible. I would prefer for the app to get this data on the fly rather than hard code numbers into the app. I have seen all those links via my search but nothing tells me how to get these values via code, c++ code specifically.
Thank you for your time If you work with telemetry, please check this bulletin board: www.irigbb.com
-
I am getting back to my application that ingests telemetry data and sends it to a display device. There will be a lot of data and a lot of packets. The data to the display device will be about 4.5 megabytes per second per stream. I think I need the program to have the ability determine the MSS and MTU so it can build the buffers and get them out in the most efficient manner possible. I would prefer for the app to get this data on the fly rather than hard code numbers into the app. I have seen all those links via my search but nothing tells me how to get these values via code, c++ code specifically.
Thank you for your time If you work with telemetry, please check this bulletin board: www.irigbb.com
-
Windows 7, Visual Studio 2010, C++ How can an application determine the maximum size for a single chunk of data to be sent from a server application to a client application on another computer? This is on a private network, not not accessible outside of the control room. There is a switch between the two computers but that is about it. I presume this can be done a run time. My application sends large amounts of telemetry data to a client for display. The goal is to reduce buffering as much as possible. The app uses overlapped I/O with completion events.
Thank you for your time If you work with telemetry, please check this bulletin board: www.irigbb.com
MTU size dictates this... To figure out the system MTU size at run-time, in Linux use getsockopt() with IP_MTU. ip(7): IPv4 protocol implementation - Linux man page[^] Windows has a similar call but not sure if the MTU option is readily available. Keep in mind that every device that the packet touches will impose it's own MTU size restrictions on it and you can't necessarily control all of them (depends on setup of course). In another words, even if your device doesn't fracture a packet, another one down the line may choose to do so. There are ways to do "mtu" discovery to find the max size transferrable. Just something to be aware of.