lwip-users
[Top][All Lists]
Advanced

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

Re: Re: [lwip-users] will lwip support asyncselect just likeWSAAsyncSele


From: Simon Goldschmidt
Subject: Re: Re: [lwip-users] will lwip support asyncselect just likeWSAAsyncSelect
Date: Wed, 06 Apr 2011 10:39:42 +0200

"chenyintao" <address@hidden> wrote:
>     Our application is  implementing a modbus-tcp poll that connecting to
> 64 servers in one thread.
>     I do it like that:
>     void modbustcppoll()
>    {
>      for(i=0;i<TCP_CLIENT_LINK_TOTALS;i++)
>         connet();

I'm assuming this is a nonblocking connect?

>      select(65,readset, writeset,errset, 0);
>      for(i=0;i<TCP_CLIENT_LINK_TOTALS;i++)
>      {
>              if (FD_ISSET(clientsocket[i].socket, writeset))
>                  send();
>              if (FD_ISSET(clientsocket[i].socket, readset))
>                 receive();
>      }      
>     }
>    When TCP_CLIENT_LINK_TOTALS  is equal 16,it works well.But when it is
> equal 64,it will cost more than 100 ms  for a socktet to receiver something.


I wouldn't have thought that the select implementation is the limiting factor 
here. Are you sure you did not run into memory limitations somewhere? 
Specifically, you need to set MEMP_NUM_NETCONN high enough as well as have 
enough pbufs, heap memory and tcp segments. Did you check the stats that there 
is no error (all 'err' members should be 0)?

While our select implementation might be somewhat suboptimal, 64 sockets should 
not be a problem at all. I'll see if I can write a test for this.

Simon
-- 
Empfehlen Sie GMX DSL Ihren Freunden und Bekannten und wir
belohnen Sie mit bis zu 50,- Euro! https://freundschaftswerbung.gmx.de



reply via email to

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