fdMonitor event when peer closes connection


my application runs on a WP8548 with Legato version 16.10.4.
I use fdMonitor events to handle the TCP activity on my SOCK_STREAM socket.
The listen(), accept(), recv() and send() functionality works fine, but, it is hard to detect when the peer closes the connection.
The legato docs mention the following:
" POLLIN + POLLOUT + POLLRDHUP => Peer closed the connection in a connection-orientated socket "

I added a check on these 3 simultaneous events in my handler, but, this is never hit.
Even the POLLRDHUP event is never hit.

The only way I can detect that the peer closed the connection, is using the POLLIN event to check if recv() returns 0.
Is this the correct way of working?
Is the explanation of the legato docs incorrect?



Hi @annaertd,
Can you provide the application with which you are observing the behavior? will check can check on our side once.

Muralidhara N.