But I have a question as to how the IP address is assigned that the router that I imagine has provided it dynamically (DHCP)
The lines of code in question are as follows:
/* Set the listening port to 10000. */
xBindAddress.sin_port = ( uint16_t ) 10000;
xBindAddress.sin_port = FreeRTOS_htons( xBindAddress.sin_port );
/* Bind the socket to the port that the client RTOS task will send to. */
FreeRTOS_bind( xListeningSocket, &xBindAddress, sizeof( xBindAddress ) );
Where? You show three lines and I’m not sure where you are suggesting xRemoteAddress.sin_addr is used within those three. In any case, I think the code is correct. There are also examples you can reference in the download. For example here:
The TCP / IP server has worked very well, it seems to me that the xRemoteAddress.sin_addr instruction is used when you want a TCP client and it is the IP of the server where you want to connect, otherwise, that is, it is how I initially published.