Victor Duchovni wrote:
SSL is a state-machine, not a pipe. Reading data may require writes, and writing data may require reads (e.g. when re-negotiating). If you want to write and read as data arrives in either direction, don't block, and enter the state machine to move data in either direction as data arrives.
"not a pipe" is a little ambiguous. The generally accepted meaning of a pipe is a single direction of data flow.
What we are talking about is a bidirectional-pipe (other people just call this a 'socket' to differentiate it from a "pipe").
I don't interpret Jason's comments as implying that "SSL is a pipe". At no point has Jason's problem been about only wanting a single direction of data flow (without requirement for data to be flowing in the other direction). Please read the original post again.
Hey did you know that TCP is a state-machine too. I bet you did. Hey reading data might require writes too, in TCP that is, for example I can't read any more new application data because the other end keeps sending me the same data block over and over, so I must write an ACK so that it sends me some new application data to process.
These matters have absolutely nothing to do with how application threads of execution are provided an API to do the business. This is all down to design rules and implementation.
Darryl ______________________________________________________________________ OpenSSL Project http://www.openssl.org User Support Mailing List openssl-users@openssl.org Automated List Manager majord...@openssl.org