lwip-devel
[Top][All Lists]
Advanced

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

Re: [lwip-devel] Moving Layer4+ protocols to main git


From: Jan Breuer
Subject: Re: [lwip-devel] Moving Layer4+ protocols to main git
Date: Wed, 9 Sep 2015 23:59:46 +0200

2015-09-09 22:52 GMT+02:00 address@hidden <address@hidden>:
Jan Breuer wrote:
In full blown OS, you can wait also on other sources - timers, external events. In netconn API, it is easy to implement this, but in socket API?

Really? How does that work on winsock(2) using "select()"?

There is the same problem - bare select() can't do it but there is alternative API for this

/* Create Event handle */
HANDLE sock_ev = WSACreateEvent();

/* Assign socket to this handle by  */
WSAEventSelect(sock_fd,sock_ev, FD_READ);

/* Wait events */
WSAEVENT pEvents[n];
pEvents[0] = sock_ev;
pEvents[1] = other_event;
res = WaitForMultipleObjects(n, pEvents, FALSE, INFINITE);

Jan

reply via email to

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