EventBufferEvent::sslError

(PECL event >= 1.2.6-beta)

EventBufferEvent::sslErrorReturns most recent OpenSSL error reported on the buffer event

说明

public EventBufferEvent::sslError ( void ) : string

Returns most recent OpenSSL error reported on the buffer event.

Note:

This function is available only if Event is compiled with OpenSSL support.

参数

此函数没有参数。

返回值

Returns OpenSSL error string reported on the buffer event, or FALSE, if there is no more error to return.

范例

Example #1 EventBufferEvent::sslError() example

<?php
// This callback is invoked when some even occurs on the event listener,
// e.g. connection closed, or an error occured
function ssl_event_cb($bev$events$ctx) {
    if (
$events EventBufferEvent::ERROR) {
        
// Fetch errors from the SSL error stack
        
while ($err $bev->sslError()) {
            
fprintf(STDERR"Bufferevent error %s.\n"$err);
        }
    }

    if (
$events & (EventBufferEvent::EOF EventBufferEvent::ERROR)) {
        
$bev->free();
    }
}
?>

参见

相关文章
php eventbufferevent enable events read write or both on a buffer eventphp eventbufferevent free a buffer eventphp eventbufferevent returns bitmask of events currently enabled on the buffer eventphp eventbufferevent returns underlying input buffer associated with current buffer eventphp eventbufferevent returns underlying output buffer associated with current buffer eventphp eventbufferevent returns most recent openssl error reported on the buffer eventphp eventbufferevent creates a new ssl buffer event to send its data over an ssl on a socketphp eventbufferevent adds data to a buffer event s output bufferphp eventbufferevent adds contents of the entire buffer to a buffer event s output bufferphp eventutil returns the most recent socket error numberphp eventutil returns the most recent socket errorphp cubrid 函数 get last error message for the most recent function callphp maxdb 函数 returns the error code for the most recent function callphp maxdb 函数 returns the error code for the most recent statement callphp sqlite 函数 returns the number of rows that were changed by the most recent sql statementphp mysqli stmt returns the error code for the most recent statement callphp mysqli returns the number of columns for the most recent queryphp mysqlnduhconnection returns the error code for the most recent function callphp sqlite3 returns the numeric result code of the most recent failed sqlite requestphp sqlite3 returns english text describing the most recent failed sqlite request
关注编程学问公众号