HiI have an implementation like yours... but i have some problem with select
(i lost some packets)
Can you post here a piece of code about your use of select in a single task
with multiple udp sockets?
Tanks you in advise!!!
Regards
Piero
2008/9/24 Muhamad Ikhwan Ismail <[EMAIL PROTECTED]>
>
> Hi guys.
>
> On my implementation of the lwip 1.3.0, i had a high frequency input and
> output of UDP packets on multiple sockets in a single task.
> So all the sockets read and write are done with select since none of them
> can be blocking. The problem was it still blocked despite select
> said something was in the mailbox. Select checks out the recvevent variable
> of the sockets, and it was 1 despite the fact
> nothing was available in mailbox and hence the recv call blocked. So i
> checked out the recv_udp() function and found this :
>
> SYS_ARCH_INC(conn->recv_avail, p->tot_len);
> /* Register event with callback */
> API_EVENT(conn, NETCONN_EVT_RCVPLUS, p->tot_len);
> if (sys_mbox_trypost(conn->recvmbox, buf) != ERR_OK) {
> netbuf_delete(buf);
> return;
> }
>
> The problem is, if the posting failed, the recvevent variable was not
> subtracted hence it stayed one despite the mailbox posting failed. I only
> found this
> with high frequency packet sending. Should this be a bug ?
>
> Greetings
>
> M Ikhwan Ismail
>
> ------------------------------
> Stay up to date on your PC, the Web, and your mobile phone with Windows
> Live. See Now<http://clk.atdmt.com/MRT/go/msnnkwxp1020093185mrt/direct/01/>
>
> _______________________________________________
> 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