# How to add TCP-CLient task in one of the uIP sample?

**URL:** <https://forums.freertos.org/t/how-to-add-tcp-client-task-in-one-of-the-uip-sample/10001>\
**Category:** Libraries\
**Created:** [June 10, 2020, 12:00pm UTC](https://forums.freertos.org/t/how-to-add-tcp-client-task-in-one-of-the-uip-sample/10001 "2020-06-10T12:00:42Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Sener](https://avatars.discourse-cdn.com/v4/letter/s/8e8cbc/32.png) [@Sener](https://forums.freertos.org/u/Sener)\
**Post date:** [June 10, 2020, 12:00pm UTC](https://forums.freertos.org/t/how-to-add-tcp-client-task-in-one-of-the-uip-sample/10001/1 "2020-06-10T12:00:42Z")

</div>

Hi,

I have running sample code for my device (LPC1768/69). I am using FreeRTOS 10.3.1.  
I got the code from the demo folder. It has uIP TCP/IP stack. Starting Web Server was straight forward.

I want to add another task besides this one;

/\* Create the uIP task. The WEB server runs in this task. \*/  
// xTaskCreate( vuIP\_Task, “uIP”, mainBASIC\_WEB\_STACK\_SIZE, ( void \* ) NULL, mainUIP\_TASK\_PRIORITY, NULL );

It should run a TCP-Client. I need to send some commands to a TCP-Server and in return I need to read some other commands back.

Maybe a couple pointers if you have any. It would be greatly appreciated.

---

<div class="post-metadata">

**Author:** ![htibosch](https://d3iykfbgfh8zhg.cloudfront.net/user_avatar/forums.freertos.org/htibosch/32/62_2.png) [@htibosch](https://forums.freertos.org/u/htibosch)\
**Post date:** [June 11, 2020, 5:54am UTC](https://forums.freertos.org/t/how-to-add-tcp-client-task-in-one-of-the-uip-sample/10001/2 "2020-06-11T05:54:23Z")

</div>

> xTaskCreate( vuIP\_Task, “uIP”, mainBASIC\_WEB\_STACK\_SIZE, ( void \* ) NULL, mainUIP\_TASK\_PRIORITY, NULL );

The call that you show starts up the uIP kernel task. It handles all state machines of the uIP logic.

The `term mainBASIC_WEB_STACK_SIZE` is misleading: the task does TCP/UDP/ICMP/ARP etc, but it does not handle HTTP, the “web layer”.

FreeRTOS does not support uIP anymore. The newer stack [lwIP](https://savannah.nongnu.org/projects/lwip/) is supported, and FreeRTOS has its own stack called [FreeRTOS+TCP](https://freertos.org/FreeRTOS-Plus/FreeRTOS_Plus_TCP/index.html).  
We are happy to answer all questions about the latter.
