Description
This article is from the Secure Sockets Layer Discussion List FAQ, by Shannon Appel SAppel@consensus.com with numerous contributions by
others.
7.2.12) In the function SSLWriteRecord(), the data buffer is copied, encrypted, then enqueued on the SSL write queue. The function then returns. What thread services the write queue? How is the thread created? (SSL Plus)
The write queue is serviced by the public function called
SSLServiceWriteQueue(). It is called in a number of places in
ssltrspt.c, including with every call to SSLWrite(). Data to be
written is sent to the I/O layer as you exit out of the write
function (for example, right near the bottom of SSLWrite).
If SSLWrite() returns SSLWouldBlockError, then make a call to
SSLServiceWriteQueue() to service the write queue. (You could
instead make a call to SSLWrite() with more data to be written, but
this is unlikely.)
The write queue is not serviced by a separate execution thread. The
write queue mechanism was designed to support non-blocking I/O
without undue overhead.
 
Continue to:
Share and Enjoy
Bookmark this story so others can enjoy it:
Tags
security, SSL, Secure Sockets Layer, protocol