FreeRTOS Win32 simulator C++

In my earlier post I pressed “Send” too early.

I experienced a bit slow, so I used Wireshark to see the communication

The Win32 simulation is quiet slow. On thing that may help is lowering the clock frequency from 1000 to 100:

#define configTICK_RATE_HZ   100U

The main purpose of the WinSim project is learning and creating demos. It is not really useful for real-life or commercial applications.

Unlike a “native” port, the WinSim port simulates everything: semaphores, tasks, clock-ticks. But it does so in a very correct way.

Have you already tried to increase the TCP WIN size?

You can set all TCP stream parameters by using FREERTOS_SO_WIN_PROPERTIES.
Have a try with these settings:

xWinProps.lTxBufSize = 8 * ipconfigTCP_MSS; /* Unit: bytes */
xWinProps.lTxWinSize = 4;                   /* Unit: MSS */
xWinProps.lRxBufSize = 8 * ipconfigTCP_MSS; /* Unit: bytes */
xWinProps.lRxWinSize = 4;                   /* Unit: MSS */

FreeRTOS_setsockopt( xSocket,
                     0,
                     FREERTOS_SO_WIN_PROPERTIES,
                     ( void * ) &xWinProps,
                     sizeof( xWinProps ) );

Please set these settings right after creating a socket. You can apply it to a listening socket. Child sockets will automatically inherit all properties from the listening socket.

When using connect(), make the sockopt settings before calling connect().

If you can, please show a new PCAP file. You can use a filter ip.addr==192.168.0.251 and store with File->Store specified packets->Selected packets only. Thank you