How to Force the Sending of Single TCP Packets Instead of Combined Data?
How can I force CANalyzer/CANoe to send my TCP data in single TCP packets instead of combining the data in one frame?
By default, TCP combines data to be sent. This is called the Nagle algorithm. To disable this algorithm, the TCP socket option TCP_NODELAY has to be set:
// avoid tcp to use the nagle algorithm
result = ipSetSocketOption(tcpSocket, "IPPROTO_TCP", "TCP_NODELAY", 1);
if( result != 0 )
ipGetLastSocketErrorAsString(tcpSocket, errorMessage, elcount(errorMessage));
write("Failed to set socket option TCP_NODELAY. Error: %s", errorMessage);
See Online help: CAPL functions -> TCP/IP CAPL functions -> IpSetSocket options
For communicating with power supplies or external measurement equipment it might be necessary to send the commands in single TCP frames.
Please complete all required fields. Fields marked with * are required.