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: chenyintao
Subject: Re: Re: [lwip-users] will lwip support asyncselect just likeWSAAsyncSelect
Date: Wed, 6 Apr 2011 16:29:46 +0800

Hi,Kieran!
    Thanks for your reply~~
    I'm sorry for my  awful written English.I will try to improve it~_~.
    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();
     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.

    
  


   祝
工作顺利!
                                
--------------
陈银桃/工业通讯技术部
address@hidden
2011-04-06

欢迎光临我们公司的网站,http://www.supcon.com
**********************************************
浙江中控技术股份有限公司/ 研发中心/工业通讯技术部   
电话:0571- 88851888 9258    
传真:0571- 86667250            
address@hidden  
邮编:310053
地址:杭州市滨江区六和路309号中控科技园A区4楼 
***********************************************
-------------------------------------------------------------
发件人:Kieran Mansley
发送日期:2011-04-03 18:45:17
收件人:Mailing list for lwIP users
抄送:
主题:Re: [lwip-users] will lwip support asyncselect just likeWSAAsyncSelect


On 2 Apr 2011, at 06:29, chenyintao wrote:

> Hi!
>   I want to use lwip 1.3.2 to  support multiple sessions in a embedded system.
>   But I foud it is so inefficient to use the api select when there are 64 
> sockets as clients.For example,a modbus client socket  can only do the 
> receive data after all the 64 sockets finish sending.   
>  will anyone can help me to solve  the problem.

No, I don't think we have anything like WSAAsyncSelect.

>  ps:in my case,64 clients sockets will  send data at the same time and the 
> sever may not respond at once,so for a socket,it will receive the packet from 
> the server after a really long time

I'm not sure I fully understand your application.  Can you give an example of 
how you're calling select.  I didn't think lwIP supported that many sockets in 
the select set for example.

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

reply via email to

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