title: Send EPOLLIN event to epoll_wait
body: <p>Is it possible to manually send <code>EPOLLIN</code> event to <code>epoll</code> for socket file descriptor without writing data to the socket?</p>
  
  <p>Maybe it is possible to use <code>fcntl</code> or <code>ioctl</code> to stop <code>epoll_wait</code> function, isn't it?</p>
  
  <p><em>UPDATE</em>:</p>
  
  <p>I understand that in most cases it does not make sense to do this, but I think it does make sense in my case.</p>
  
  <p>I'm writing a network plugin for a program, which I cannot modify. The plugin API gives me a socket FD and tells me to write a function to read <code>n</code> bytes from the socket. I use <code>ssl_read</code> function from the <code>polarssl</code> library for this, which reads all the data into its own inner buffer, that is more than <code>n</code> bytes.</p>
  
  <p>What happens in the program? The program waits (<code>epoll_wait</code>) when the socket receives data and then tells the plugin to read about 4kB of data. And then it waits for the next data to be received by the socket. When the socket receives 12kB of data, the program calls the <code>read</code> function within the plugin, which reads all the data with <code>ssl_read</code> function. As a result, there's no more data available for the socket, but the <code>polarssl</code> library has it's own buffer, which has about 8kB of data available.</p>
  
  <p>So now I need to tell the program to call the <code>read</code> function of the plugin, which is not going to read data from the socket directly, but is going to read data from inner <code>polarssl</code> buffer.</p>