> I wonder if anyone would have an idea on how to peek
>         [recv(sock, buf, howmuch, MSG_PEEK)]
> incoming data on the server if client is using non blocking sockets?
> 
> I have
>         BIO_do_connect (nonblocking);
> on the client side and
>         got = recv (conn->s, buf, 100, MSG_PEEK);
> on the server side. For some reason the server doesn't get anything while
> the client just tries and tries to BIO_do_connect.
> 
> Could it be so that one can't peek if the other side is nonblocking? How
> could this be done? I don't want to do anything with the data I just want
to
> know whether the incoming data means that client has gone (reset) or
should
> I just go on and handle the data normally with SSL-functions.
> 
>         Yours  VW

I'm just learning SSL, so this may not be correct, but
In normal sockets programming the sequence on the server
side is bind(), listen(), accept(), which then puts you
in a state where you can recv() data.  The point here
is:  is anyone "listening" on the server?  

Perhaps you could use the "netstat" command to validate
that the servere side is listening on the correct port, etc.

-- 
Tom Anderson                    | Ex ignorantia ad sapientiam
Director, Testing and Tools     | e tenbris ad lucem!
[EMAIL PROTECTED]             | - someone famous i'm sure!


        Yes, there is someone listening. And the whole thing works if client
doesn't use non blocking sockets. For some reason non blocking
BIO_do_connect doesn't send anything with it's first few attempts (it's
fourth or fifth time that makes things work) and that's why (I suppose)
        got = recv (conn->s, buf, 100, MSG_PEEK);
hangs and doesn't see anything coming from the socket.

        Theres something terrible wrong and I bet I have caused it as usual
:-) I just can't figure out what am I missing here.

        Yours  VW
______________________________________________________________________
OpenSSL Project                                 http://www.openssl.org
User Support Mailing List                    [EMAIL PROTECTED]
Automated List Manager                           [EMAIL PROTECTED]

Reply via email to