On Wed, Nov 23, 2005, Perry L. Jones wrote:

> I have some legacy code that uses the ioctl() function on a socket to 
> see how many bytes are ready to be read. I was wounding if this can be 
> done with an openssl socket or if I can uses SSL_get_fd( sslSocket ) and 
> then uses the standard socket ioctl functions.
> 

Well you can do it but it wont necessarily do what you want. This will just
tell you the number of bytes available on the underlying transport, not the
amount of SSL data available. You'll only generally be able to obtain SSL data
when a full application data packet has been received.

That means that the amount of data available may not be a full packet (in
which case you'd get nothing) not application data (again nothing) or even if
it was a full packet you'd get less data due to the headers and MAC data.

Steve.
--
Dr Stephen N. Henson. Email, S/MIME and PGP keys: see homepage
OpenSSL project core developer and freelance consultant.
Funding needed! Details on homepage.
Homepage: http://www.drh-consultancy.demon.co.uk
______________________________________________________________________
OpenSSL Project                                 http://www.openssl.org
User Support Mailing List                    openssl-users@openssl.org
Automated List Manager                           [EMAIL PROTECTED]

Reply via email to