Hi, From: "rakaur" <rakaur / gmail.com> > > My code at the previous URL has been updated, as it seems I've found > the culprit. > > SSLSocket#read doesn't behave as it should. If you specify a size (as I > did earlier, 8192) it blocks until that many bytes have been read, > instead of reading up to a maximum of that many bytes as TCPSocket#recv > does. > > Is there any obvious way to get around this other than reading it in > one character at a time? This would use significantly more CPU, as it > results in one system call per byte instead of one system call per > maximum of 8192 bytes. It looks like SSLSocket#pending calls SSL_pending(), which, according to: http://www.openssl.org/docs/ssl/SSL_pending.html might be useful. HTH, Bill