savannah-users
[Top][All Lists]
Advanced

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

[Savannah-users] help with lwip client


From: bbgao_xwcumt
Subject: [Savannah-users] help with lwip client
Date: Tue, 11 Aug 2009 19:41:44 +0800 (CST)

                                                         ShangHai
                                                         China
                                                         August 11,2009
 
Dear sir,
    I recently use your company's lwip on ARM cpu. But now I have a problem when I do the Client and need you give me a help! Follow is my code:
void T_LwIPClientEntry(void * pvArg)
  {
      extern void vHandler_Client(ST_NETCONN *pstConn);
      ST_NETCONN  *__pstConn;  
      struct ip_addr __stRemoteIpAddr;    
      INT8S  __s8ConnClient;
      INT8U  i=1;
    
while(OS_TRUE)
{     
  IP4_ADDR(&__stRemoteIpAddr,Remote_IP_ADDR_0,Remote_IP_ADDR_1,Remote_IP_ADDR_2,Remote_IP_ADDR_3);       
       __pstConn = netconn_new(NETCONN_TCP);
       netconn_bind(__pstConn, NULL, 40000); 
       __s8ConnClient = netconn_connect(__pstConn,&__stRemoteIpAddr,60000);
       if(__s8ConnClient != -1)   //if(1)
       { 
          vHandler_Client(__pstConn);                                 
          while(netconn_delete(__pstConn) != ERR_OK)
             OSTimeDlyHMSM(0, 0, 1, 0);
       
    }//end //if(1)
 }//end while
}//end T_LwIPClientEntry
    The Server is PC. The problem is that when the Client runs before the Server
for a while, the  connection will be failure . But when the Server runs before the Client for a while, the  connection will be successful .
    Thank you very much!
                                                       Good Luck,
                                                       Mrs Gao
  
   
   




没有广告的终身免费邮箱,www.yeah.net

reply via email to

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