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 closes file descriptor associated with the current buffer eventphp eventbufferevent connect buffer event s file descriptor to given address or unix socketphp 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 set the read and write timeout for a buffer eventphp eventbufferevent returns most recent openssl error reported on the buffer eventphp 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 maxdb 函数 returns the error code for the most recent function callphp maxdb 函数 returns the error code for the most recent statement callphp mongodb check if there was an error on the most recent db operation performedphp mysqli stmt returns the error code for the most recent statement callphp mysqlnduhconnection returns the error code for the most recent function callphp mysqlnduhconnection returns the number of columns for the most recent queryphp sqlite3 returns the number of database rows that were changed or inserted or deleted by the most recent sql statementphp sqlite3 returns the numeric result code of the most recent failed sqlite requestphp sqlite3 returns english text describing the most recent failed sqlite requestphp sqlite3 returns the row id of the most recent insert into the database
关注编程学问公众号