[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [lwip-devel] Issue related to Tcp Server max connections
From: |
Zach Smith |
Subject: |
Re: [lwip-devel] Issue related to Tcp Server max connections |
Date: |
Thu, 27 Jun 2013 18:30:58 +0000 |
As for your question #1:
It is by design that any new connection of same or greater priority than an
already existing connection replaces the older connection. If you want to
ensure that a connection does not get overwritten by a new connection I think
you can use tcp_setprio(struct tcp_pcb *pcb, u8_t prio) to set its priority
higher than the default. The default is TCP_PRIO_NORMAL when a new connection
is created. See the following:
tcp_new(void)
tcp_alloc(u8_t prio)
tcp_setprio(struct tcp_pcb *pcb, u8_t prio)
-Zach
-----Original Message-----
From: address@hidden [mailto:address@hidden On Behalf Of Ishmeet
Sent: Thursday, June 27, 2013 5:38 AM
To: address@hidden
Subject: [lwip-devel] Issue related to Tcp Server max connections
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
This email may contain information that is confidential and/or legally
privileged in nature. The message is intended for the use of the individual(s)
or entity listed above. If you are not the intended recipient, please do not
read, copy, publish or distribute the communication; and notify the sender by
replying to this message and deleting this copy and any copies that may be in
your electronic system. Thank you for your compliance.