maybe the problem will be have  different sockets for different port?

I don´t know why the application blocking and don´t accept any connection,
or one ( i saw that with the emulator JTAG ICE mkII). The while is permanent
until numconection = 8 = NUM_SOCKET.

Thanks
Oscar

On Tue, Sep 29, 2009 at 3:39 PM, Oscar F <[email protected]> wrote:

> Hello Kieran, but i did that no?
>
> do{
>           // Check for received packets on configured sockets (blocking )
>           ret = select(maxfd+1, &acceptset, NULL, NULL, NULL);
>
>           if (ret > 0) //No error
>             {
>               for(i=0;i<NUM_SOCKET;i++)
>               {
>                  if (FD_ISSET(lSocket[i], &acceptset))
>                   {
>                    //connection receive ==> then accept
>                    aSocket[i]= accept(lSocket[i],(struct
> sockaddr*)&sRemoteAddr[i],(
> socklen_t *)sizeof(sRemoteAddr[i]));
>                    if(aSocket[i]>0)
>                     {
>                        if (i<3)
>                        {
>                         FD_SET(aSocket[i], &readset); //Add the three
> socket to wait for the receive data
>                         if (aSocket[i]> maxfd2)
>                          maxfd2 = aSocket[i];
>                        }
>                        numconection++;
>                     }
>                    else
>                       lwip_close(aSocket[i]);
>
>                    //FD_CLR(lSocket[i], &acceptset);
>                   }
>                 }
>               }
>           else
>            {
>                CloseConnectionPC(aSocket,lSocket );
>                return;
>            }
>       }while ( numconection <NUM_SOCKET );
>
>  only leave the while when i have all socket accepted. no?
>
> Oscar
>
>
>
>
> On Tue, Sep 29, 2009 at 3:10 PM, Kieran Mansley <[email protected]> wrote:
>
>> On Tue, 2009-09-29 at 14:19 +0200, Oscar F wrote:
>>
>> > how do i reset the fd struct?
>>
>> Move the block of code that sets acceptset inside the while loop that
>> calls select().
>>
>> Kieran
>>
>>
>>
>> _______________________________________________
>> lwip-users mailing list
>> [email protected]
>> http://lists.nongnu.org/mailman/listinfo/lwip-users
>>
>
>
_______________________________________________
lwip-users mailing list
[email protected]
http://lists.nongnu.org/mailman/listinfo/lwip-users

Reply via email to