Monitor socket FD

Hello,
to monitor a socket in case of error or disconnection is this the right way:

le_fdMonitor_Create(“SockMon”, // Name for diagnostics
sockFD, // fd to monitor
SocketStateHandler, // Handler function
POLLIN |POLLOUT | POLLRDHUP );

I’m not sure on bitwise (last parameter) to set…

regards,
Gianmaria

Dont care…

The following events are always monitored, even if not requested:

  • POLLRDHUP = Other end of stream socket closed or shutdown.
  • POLLERR = Error occurred.
  • POLLHUP = Hang up.

It’s enough for me.