lwip-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [lwip-users] Two parallel connections at the same time (TCP protocol


From: address@hidden
Subject: Re: [lwip-users] Two parallel connections at the same time (TCP protocol control blocks)
Date: Mon, 7 Jan 2019 19:59:18 +0100
User-agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:60.0) Gecko/20100101 Thunderbird/60.4.0

Am 07.01.2019 um 12:48 schrieb Klawonn, Tobias:
Dear All,

I want to use the lwip TCP/IP stack with two TCP connections at the same time.

This shouldn't be a problem at all!

Additionally, I would like to use TCP protocol control blocks without RTOS. For one connection everything is fine. But, if I use two connections parallel, I get messages, which only should send over the first connection, over the second connection.

The problem in details:

At first, I connect the client with the server over TCP/IP. Than I send a message over this open connection. The message arrives at the server. The server sends the confirmation-signals (ACK) of every receive message fragment to the client. The message ends normally with an MESSAGE-ACK. Everything is fine.

In the next step I open a new connection (second) from the client to the server (client: same IP-address, but other port, server: same IP-Address, but other port). After this, I send a message over the second connection while the first connection is still open. The server sends the confirmation-signals (ACK) of every receive message to the client.

And now the problem:

Once, the sending process over the second connection is finished, than the server sends all confirmation-signals (ACK, MACK), which was sent to confirm every receive message fragment over the second connection, in one message over the first connection to the client.
This is not normal.
I find out that all confirmation-signals are stored in the unsent and unacked buffer for every TCP protocol control block. But every TCP protocol control block uses the same unsent and unacked buffer. Is that correct ?

No, that's not correct. Maybe you somehow managed to reuse pbufs. Maybe your driver frees the pbuf on tx? Or you might have violated lwIP's threading requirements (which is the reasond for most of bugs like this)?

Regards,
Simon


Important is, that two connections should be open in the same time.

I would be glad, if you can help me with my problem.

Thank you for your efforts in advance.

Yours sincerely,

Tobias Klawonn

Tobias Klawonn, M.Sc.
Softwareentwickler Embedded Systems

EUROIMMUN AG
Software Embedded Systems
Seekamp 31
D-23560 L├╝beck

Telefon : +49 (0) 451 5855 24121

E-Mail: address@hidden <mailto:address@hidden>


_______________________________________________
lwip-users mailing list
address@hidden
https://lists.nongnu.org/mailman/listinfo/lwip-users





reply via email to

[Prev in Thread] Current Thread [Next in Thread]