Event EventBufferEvent::sslError
(PECL event >= 1.2.6-beta)
EventBufferEvent::sslError — 버퍼 이벤트에 대해 보고된 가장 최근의 OpenSSL 오류를 반환합니다.
설명
public EventBufferEvent::sslError(): string
버퍼 이벤트에 대해 보고된 가장 최근의 OpenSSL 오류를 반환합니다.
메모: 이 함수는 Event가 OpenSSL 지원으로 컴파일된 경우에만 사용할 수 있습니다.
매개변수
이 함수에는 매개변수가 없습니다.
반환 값
버퍼 이벤트에 대해 보고된 OpenSSL 오류 문자열을 반환하거나 더 이상 반환할 오류가 없으면 false
를 반환합니다.
Examples
예제 #1 EventBufferEvent::sslError() 예제
<?php
// This callback is invoked when some even occurs on the event listener,
// e.g. connection closed, or an error occurred
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();
}
}
?>
기타
- EventBufferEvent::sslRenegotiate() - SSL 재협상을 시작하도록 bufferevent에 지시합니다.