summaryrefslogtreecommitdiff
path: root/FreeRTOS-Plus/Demo/FreeRTOS_Plus_TCP_UDP_Mode_CLI_Windows_Simulator/DemoTasks/SimpleClientAndServer.c
diff options
context:
space:
mode:
Diffstat (limited to 'FreeRTOS-Plus/Demo/FreeRTOS_Plus_TCP_UDP_Mode_CLI_Windows_Simulator/DemoTasks/SimpleClientAndServer.c')
-rw-r--r--FreeRTOS-Plus/Demo/FreeRTOS_Plus_TCP_UDP_Mode_CLI_Windows_Simulator/DemoTasks/SimpleClientAndServer.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/FreeRTOS-Plus/Demo/FreeRTOS_Plus_TCP_UDP_Mode_CLI_Windows_Simulator/DemoTasks/SimpleClientAndServer.c b/FreeRTOS-Plus/Demo/FreeRTOS_Plus_TCP_UDP_Mode_CLI_Windows_Simulator/DemoTasks/SimpleClientAndServer.c
index 2c65a264b..183853ea0 100644
--- a/FreeRTOS-Plus/Demo/FreeRTOS_Plus_TCP_UDP_Mode_CLI_Windows_Simulator/DemoTasks/SimpleClientAndServer.c
+++ b/FreeRTOS-Plus/Demo/FreeRTOS_Plus_TCP_UDP_Mode_CLI_Windows_Simulator/DemoTasks/SimpleClientAndServer.c
@@ -112,6 +112,7 @@ const portTickType x150ms = 150UL / portTICK_RATE_MS;
xDestinationAddress.sin_port = ( uint16_t ) ( ( uint32_t ) pvParameters ) & 0xffffUL;
xDestinationAddress.sin_port = FreeRTOS_htons( xDestinationAddress.sin_port );
+ xDestinationAddress.sin_family = FREERTOS_AF_INET;
for( ;; )
{
@@ -170,6 +171,7 @@ Socket_t xListeningSocket;
so the IP address is valid here. */
xBindAddress.sin_port = ( uint16_t ) ( ( uint32_t ) pvParameters ) & 0xffffUL;
xBindAddress.sin_port = FreeRTOS_htons( xBindAddress.sin_port );
+ xBindAddress.sin_family = FREERTOS_AF_INET;
/* Bind the socket to the port that the client task will send to. */
FreeRTOS_bind( xListeningSocket, &xBindAddress, sizeof( xBindAddress ) );
@@ -237,6 +239,7 @@ const size_t xStringLength = strlen( ( char * ) pucStringToSend ) + 15;
xDestinationAddress.sin_port = ( uint16_t ) ( ( uint32_t ) pvParameters ) & 0xffffUL;
xDestinationAddress.sin_port = FreeRTOS_htons( xDestinationAddress.sin_port );
+ xDestinationAddress.sin_family = FREERTOS_AF_INET;
for( ;; )
{
@@ -345,6 +348,7 @@ Socket_t xListeningSocket;
xBindAddress.sin_port = ( uint16_t ) ( ( uint32_t ) pvParameters ) & 0xffffUL;
xBindAddress.sin_port = FreeRTOS_htons( xBindAddress.sin_port );
+ xBindAddress.sin_family = FREERTOS_AF_INET;
/* Bind the socket to the port that the client task will send to. */
FreeRTOS_bind( xListeningSocket, &xBindAddress, sizeof( xBindAddress ) );