Quality RTOS & Embedded Software

 Real time embedded FreeRTOS RSS feed 
Real time embedded FreeRTOS mailing list 
Quick Start Supported MCUs PDF Books Trace Tools Ecosystem TCP & FAT Training


Closing TCP Connection

Posted by saiberion on December 3, 2007
I know about this for some time but now I need to know why it is like that.

In the lwIP Rowley Demo project the TCP connection is closed by the controller after each receive. Is there a reason behind this behaviour?
The initial idea was that a PC application opens a TCP connection to the controller and keeps it open until it is closed by the application.

I'm using FreeRTOS 4.6.0 and lwIP 1.2.0 on a AT91SAM7X512

RE: Closing TCP Connection

Posted by Patrick DEFLANDRE on December 4, 2007
Hello saiberion,

You are right. But this application is a special one : a web server. It wait for request, serve it, and close immediately the connection.

It is impossible to keep connection open with each client, as the number of possible client is quite infinite...

But I am not an expert in web server. I don't have coded one...


RE: Closing TCP Connection

Posted by sotd on December 4, 2007
I think this is how HTTP 1.0 is defined to behave. HTTP 1.1 is different.

RE: Closing TCP Connection

Posted by saiberion on December 4, 2007
For a web server this behaviour is OK.

But in my case I would like to have a connection-oriented communication.
I already tried to keep it running by out commenting netcon_delete but it didn't work right for me or I forgot something.
And the number of connections to the controller is limited to 1 by design.

RE: Closing TCP Connection

Posted by sla on December 5, 2007
Did you try to comment

netconn_close( pxNetCon );


RE: Closing TCP Connection

Posted by saiberion on December 10, 2007
Yes I did with no success.
First communication packet is processed and atm it seems to me that the next packet doesn't even reach the application.

Is there maybe an example how to handle connection oriented communication?

[ Back to the top ]    [ About FreeRTOS ]    [ Sitemap ]    [ ]

Copyright (C) 2004-2010 Richard Barry. Copyright (C) 2010-2016 Real Time Engineers Ltd.
Any and all data, files, source code, html content and documentation included in the FreeRTOSTM distribution or available on this site are the exclusive property of Real Time Engineers Ltd.. See the files license.txt (included in the distribution) and this copyright notice for more information. FreeRTOSTM and FreeRTOS.orgTM are trade marks of Real Time Engineers Ltd.

Latest News:

FreeRTOS V9.0.0 is now available for download.

Free TCP/IP and file system demos for the RTOS

Sponsored Links

⇓ Now With No Code Size Limit! ⇓
⇑ Free Download Without Registering ⇑

FreeRTOS Partners

ARM Connected RTOS partner for all ARM microcontroller cores

Renesas Electronics Gold Alliance RTOS Partner.jpg

Microchip Premier RTOS Partner

RTOS partner of NXP for all NXP ARM microcontrollers

Atmel RTOS partner supporting ARM Cortex-M3 and AVR32 microcontrollers

STMicro RTOS partner supporting ARM7, ARM Cortex-M3, ARM Cortex-M4 and ARM Cortex-M0

Xilinx Microblaze and Zynq partner

Silicon Labs low power RTOS partner

Altera RTOS partner for Nios II and Cortex-A9 SoC

Freescale Alliance RTOS Member supporting ARM and ColdFire microcontrollers

Infineon ARM Cortex-M microcontrollers

Texas Instruments MCU Developer Network RTOS partner for ARM and MSP430 microcontrollers

Cypress RTOS partner supporting ARM Cortex-M3

Fujitsu RTOS partner supporting ARM Cortex-M3 and FM3

Microsemi (previously Actel) RTOS partner supporting ARM Cortex-M3

Atollic Partner

IAR Partner

Keil ARM Partner

Embedded Artists