epoll and closed sockets / socket errors
Brought to you by:
lilyco
Similar to what the system epoll does, the UDT epoll should always report closed sockets and socket errors, even if the application is not explicitly listening for them. Currently there is no way for an application to detect a closed UDT socket if it's not listening for UDT_EPOLL_OUT (which will however cause UDT::epoll_wait to immediately return).
My suggestion is to either add a new parameter to UDT::epoll_wait that returns the sockets that have errors or are closed, or probably better to not break the API to return these sockets in the "readfds" and "writefds" list so on the next "UDT::recv" or "UDT::send" the error is properly raised.