Ron Arts wrote:
Hi,
subject says it all. If there's no example with
libevent, can someone recommend another place to look?
I tried Googling but couldn't find a concise example.
For example, w/ OpenSSL you can turn the socket to be non-blocking and
watch for what openssl 'needs' after a failed attempt to read/write...
Ex:
int ret = SSL_read(ssl, buffer, len);
if(ret < 0) {
int err = SSL_get_error(ret);
switch(err) {
case SSL_ERROR_WANT_WRITE:
/* Hook up libevent to wait on write then retry w/ exact same
argument */
break;
case SSL_ERROR_WANT_READ:
/* Hook up libevent to wait on read then ... */
break;
default: /* Something else..... */
}
}
_______________________________________________
Libevent-users mailing list
Libevent-users@monkey.org
http://monkeymail.org/mailman/listinfo/libevent-users