cancel
Showing results for 
Search instead for 
Did you mean: 

ECHO_TCP_Server (LWIP)

Divyanshu
Associate II

TCP_ECHO_Server

When I open TCP port and send some data on that port. It works fine.

But if I open 2 tcp port at same IP and same port (Max port I can have 5) .So while receiving data on both i gets the data alternatively on each port.

I want data should travel on each port irrespective of the number. Because port is same.

2 REPLIES 2

Hello

>> I want data should travel on each port irrespective of the number. Because port is same.

I am not sure that lwip programmers took care about this special case to listen to two times the same port.

if packet is for x.x.x.x IP and y Port, what is the meaning to process the same packet 2 times?

Note that after processing an input buffer the processing callback frees the buffer so can't be processed second time.

Divyanshu
Associate II

Hi Vangelis

Sorry, I was not active for long time.

With respect to above issue, if packet is for x.x.x.x IP and y Port and let say packet is "abc".

I opened a tcp client on my laptop with x.x.x.x IP and y Port( Terminal-1). and i opened another terminal with same x.x.x.x IP and y Port.(called terminal-2)

Now when I send data "abc", I will receive"123" in return from my devices. So i receive "123" from my devices but it comes alternatively ( first on terminal-1 then on terminal 2).But it should come to both terminal simultaneously irrespective of the terminal.

Just like Wireshark software does.