lwip-devel
[Top][All Lists]
Advanced

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

Re: [lwip-devel] Issue related to Tcp Server max connections


From: Rüdiger Asche
Subject: Re: [lwip-devel] Issue related to Tcp Server max connections
Date: Fri, 28 Jun 2013 19:06:04 +0200

Concerning q 1:
 
? Are you sure this is what happens? Doesn't seem right. First of all, you apparently spawn a thread or process for each accepted socket, true? What OS are you using? What is the listen backlog you specify when you submit the listen() call on the port?
 
If you don't serve the clients concurrently (meaning you serve all incoming connections in one thread/process in turn), what you should see is that the first four connections go thorugh the 3 way TCP handshake alright, but user data is not processed until your worker process comes back to its accept (in which case it gets to service the oldest accepted entry). A fifth that would line up while the first four are in the queue or being serviced should see a timeout on its SYN packet. If you only allow four PCBs, the fifth one should never get attached until one of the four is being freed (which normally won't happen until a grace period after closing the socket has expired.
 
One connection disconnecting another, still active connection sounds strange to me. What makes you think that this happens?
Regarding question 2 - Since you already see the ping requests, your unit apparently has gone through DNS resolution alright, in which case it will consult its routing policy to determine which node to send the ARP request to. That normally is the default gateway for public addresses. So if you misconfigured your unit (or your DHCP server if your unit is a DHCP client) to not reach the internet, that might be a problem cause.
2013/6/27 Ishmeet <address@hidden>
Hello guys,

I have been using Lwip 1.4.1 on STM32L151 embedded board, most of the things
like udp tcp dhcp ping are working but I am facing some issues with them,

1. When module(embedded board) acts as tcp server with maximum 4
connections(meaning 4 tcp clients can connect simultaneously), and I start
connecting on IP address and port no. from a standard PC utility, then 5th
client also connects and it disconnects the first client which was already
connected. This has caused me a loss of client that was already in process
of data transmission. This is what I have set in lwipopts.h

#define MEMP_NUM_TCP_PCB        4               //10
/* MEMP_NUM_TCP_PCB_LISTEN: the number of listening TCP
   connections. */
#define MEMP_NUM_TCP_PCB_LISTEN 4       //6
/* MEMP_NUM_TCP_SEG: the number of simultaneously queued TCP
   segments. */

2. when I try to ping a remote IP address (like IP addr of google.com) using
ping_send_now api in ping.c, I only see ping request going from module,no
ping reply's.
 Actually it should arp our router for this process to happen. Is this a bug
or I did'nt read the user documents for it and there is a macro kind of to
be enable.

Little knowledge sharing will be much appreciated.

Ishmeet



--
View this message in context: http://lwip.100.n7.nabble.com/Issue-related-to-Tcp-Server-max-connections-tp21615.html
Sent from the lwip-devel mailing list archive at Nabble.com.

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


reply via email to

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