title: libevent and non-blocking sockets
body: <p>I understand that in order to monitor a socket using libevent,  <code>event_set()</code> should first be called with the correct parameters. </p>
  
  <p>The libevent documentation states that the <code>event</code> parameter to event_set() can be either EV_READ or EV_WRITE. And that this event parameter is the event to look out for.</p>
  
  <p>But what socket events do EV_READ and EV_WRITE correspond to? I mean how would I monitor for a change in connection status, versus monitor for an incoming message? </p>