I was wondering if anybody ever managed to write functions which
emulate the standard socket read and write behaviour. My web server
uses the following logic to read from a socket:

a) do a select and wait until data is available

b) do a read (recv)

c) if read returns > 0 goto c1
    if read returns = 0 goto c2
    if read returns < 0 goto c3

    c1) put the received data into a buffer, if the data in the
        buffer is a valid (and complete) HTTP request, process
        the request, close the socket, and exit. If the request
        is not complete yet, go back to a)

    c2) the remote socket (peer) has been closed, close the
        local socket, and exit

    c3) an error occured, print an error message, and exit

Can you use normal select()s to check if data is available from
an SSL socket? How do you know if the remote side (peer) has closed
the connection?

Thanks for any help!

Remo
_______________________________________________________________________

[ [EMAIL PROTECTED] ] "Ich dusche warm!" [ http://public.toilet.ch/ ]
______________________________________________________________________
OpenSSL Project                                 http://www.openssl.org
Development Mailing List                       [EMAIL PROTECTED]
Automated List Manager                           [EMAIL PROTECTED]

Reply via email to