title: libevent : whether event can be triggered if the related socket is closed by local program
body: <p>if I add an event for a connection socket which is returned by accept(), as below</p>
  
  <pre><code>    event_set(&amp;conn_ev, connfd, EV_READ|EV_PERSIST, on_recv, NULL);
      event_base_set(base, &amp;conn_ev);
      event_add(&amp;conn_ev, NULL);
  </code></pre>
  
  <p>if at sometime, the local program(not the peer) closes the socket, will the <code>conn_ev</code> be triggered?
  if so, how to detect whether whether the event is due to the closing of the socket?</p>
  
  <p>is it recv(connfd,..) returns -1 and errno is set <code>EBAD</code> or any other cases?</p>
  
  <p>thanks!</p>