lwip-devel
[Top][All Lists]
Advanced

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

Re: [lwip-devel] connect block for ever?? (i need a workaround)


From: Piero 74
Subject: Re: [lwip-devel] connect block for ever?? (i need a workaround)
Date: Thu, 2 Oct 2008 17:49:47 +0200

using lwip on a board with microcontroller and trying a connection to a server in a host NOT CONNECTED on the network
TCP_MAXSYNRTX  set with default (6)

this is my simple code:

  sd = socket(AF_INET,SOCK_STREAM,IPPROTO_TCP);
  if (sd >= 0)
  {
    // valid socket
    addr.sin_family = AF_INET;
    IP4_ADDR(&ip, 10, 51, 15, 34);
    addr.sin_addr.s_addr = ip.addr;
    addr.sin_port = htons(5555);
    connect(sd, &addr, sizeof(addr) );                  // remote connect (1)
  }
  while(1)
  {
    pippo++;                                                    // (2)
    vTaskDelay(UDP_WAITNETWORK);
  }

using breakpoints (but i will have a more accurate measurement)
15-18 seconds


2008/10/2 bill <address@hidden>
My empirical data on WinXP timing out a connection is between 5 and 6
minutes.

> -----Original Message-----
> From: lwip-devel-bounces+bauerbach=arrayonline.com@nongnu.org
> [mailto:lwip-devel-bounces+bauerbach=arrayonline.com@nongnu.org] On
> Behalf Of Kieran Mansley
> Sent: Thursday, October 02, 2008 8:38 AM
> To: lwip-devel
> Subject: Re: [lwip-devel] connect block for ever?? (i need a
> workaround)
>
> On Thu, 2008-10-02 at 14:26 +0200, Piero 74 wrote:
> >
> > HOURS??? my understanding is that SYN packet will be send
> >  TCP_MAXSYNRTX times,
> > using a not simple timeout schema... but i hope that this timeout
> > could be of the order of seconds
> > and the function netconn_connect returns after this error  (i have to
> > d some test) :O|
>
> The timeout between SYN retransmissions starts off as a few seconds,
> but
> it is increased exponentially each time the packet is retransmitted.
> Exponential increases very quickly get large.  I've not worked out the
> total time myself, but should be a relatively easy sum to do.
>
> Kieran
>
>
>
> _______________________________________________
> lwip-devel mailing list
> address@hidden
> http://lists.nongnu.org/mailman/listinfo/lwip-devel



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


reply via email to

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