I’m trying to implement a TCP / IP server based on the following tutorial:
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 ) );
Is that way correct?
or should the following instruction be used?
Thanks for any comments.