#include "FreeRTOS_IP.h"\r
#include "FreeRTOS_Sockets.h"\r
#include "SimpleUDPClientAndServer.h"\r
+#include "SimpleTCPEchoServer.h"\r
#include "TCPEchoClient_SingleTasks.h"\r
#include "demo_logging.h"\r
\r
#define mainECHO_CLIENT_TASK_STACK_SIZE ( configMINIMAL_STACK_SIZE * 2 ) /* Not used in the Windows port. */\r
#define mainECHO_CLIENT_TASK_PRIORITY ( tskIDLE_PRIORITY + 1 )\r
\r
+/* Echo server task parameters. */\r
+#define mainECHO_SERVER_TASK_STACK_SIZE ( configMINIMAL_STACK_SIZE * 2 ) /* Not used in the Windows port. */\r
+#define mainECHO_SERVER_TASK_PRIORITY ( tskIDLE_PRIORITY + 1 )\r
+\r
/* Define a name that will be used for LLMNR and NBNS searches. */\r
#define mainHOST_NAME "RTOSDemo"\r
#define mainDEVICE_NICK_NAME "windows_demo"\r
same RTOS task). The IP address of the echo server must be configured using the\r
configECHO_SERVER_ADDR0 to configECHO_SERVER_ADDR3 constants in\r
FreeRTOSConfig.h.\r
+\r
+mainCREATE_TCP_ECHO_SERVER_TASK: When set to 1 a task is created that accepts\r
+connections on the standard echo port (port 7), then echos back any data\r
+received on that connection.\r
*/\r
#define mainCREATE_SIMPLE_UDP_CLIENT_SERVER_TASKS 1\r
#define mainCREATE_TCP_ECHO_TASKS_SINGLE 1\r
-\r
+#define mainCREATE_TCP_ECHO_SERVER_TASK 0\r
/*-----------------------------------------------------------*/\r
\r
/*\r
}\r
#endif /* mainCREATE_TCP_ECHO_TASKS_SINGLE */\r
\r
+ #if( mainCREATE_TCP_ECHO_SERVER_TASK == 1 )\r
+ {\r
+ vStartSimpleTCPServerTasks( mainECHO_SERVER_TASK_STACK_SIZE, mainECHO_SERVER_TASK_PRIORITY );\r
+ }\r
+ #endif\r
+\r
xTasksAlreadyCreated = pdTRUE;\r
}\r
\r