I have a TLS Server and TLS Client which is running on the top of *Edge
Triggered EPOLL* and *Non Blocking Sockets.*

 Client and server is doing following operations

   1. Client -> Connect to TLS Server. (SSL_CTX_new -> SSL_new ->
   SSL_set_fd)
   2. Client -> Set modes
    (SSL_MODE_ACCEPT_MOVING_WRITE_BUFFER, SSL_MODE_AUTO_RETRY)
   3. Server -> Sends streaming data to the connected clients.
   4. Client -> Read data whenever EPOLLIN occurs.
   5. Server -> When it fails to send data (Client is slow to read), stores
   data into local buffer and waits for EPOLLOUT to occur.
   6. Server -> When EPOLLOUT occurs for particular socket it sends the
   same data which was failed previously.


Problem that I am seeing is even after the client is successfully reading
all the data from Kernel Buffer, Event EPOLLOUT is not invoked in Server
Side (In Server Buffered data is ready for writing to clients).

EPOLLOUT is invoked only one time in Server side, when the SSL_WRITE fails
for first time.

Is there any specific way to handle SSL_READ and SSL_WRITE over Edge
Triggered EPOLL ?

I am very new to openssl. Please help.

-- 
Harikrishan R
http://harikrishnanr.wordpress.com/

Reply via email to