[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-devel
Subject:    Re: KSSL and non-blocking sockets
From:       Thiago Macieira <thiagom () mail ! com>
Date:       2003-09-30 22:42:06
[Download RAW message or body]

[Attachment #2 (multipart/signed)]


Damian Kramer wrote:
>Hi George,
>
>Thanks for the quick response. I get -1 returned from the connect method.
>Setting the socket to blocking allows it to connect with a return value of
>1. I took a quick look at the source of KSSL, but -1 is returned in a
>couple of places, so I'm not sure which part it's getting upset at :)

The problem with non-blocking SSL is that it requires to read and write at the 
same time. That is, to read an SSL packet, the SSL library might require to 
write to the socket and vice-versa.

You must always test your I/O return values using the get error functions 
(KSSL::getError, maybe?).

I've had a bit of dealing with OpenSSL and I tried once to integrate their 
sockets with our socket code (I'm the socket maintainer). Needless to say 
that that project did not go forth, due to lack of documentation.

-- 
  Thiago Macieira  -  Registered Linux user #65028
   thiagom@mail.com           
    ICQ UIN: 1967141   PGP/GPG: 0x6EF45358; fingerprint:
    E067 918B B660 DBD1 105C  966C 33F5 F005 6EF4 5358

[Attachment #5 (application/pgp-signature)]

>> Visit http://mail.kde.org/mailman/listinfo/kde-devel#unsub to unsubscribe <<


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic