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?