EventBufferEvent::getInput

(PECL event >= 1.2.6-beta)

EventBufferEvent::getInputReturns underlying input buffer associated with current buffer event

说明

public EventBufferEvent::getInput ( void ) : EventBuffer

Returns underlying input buffer associated with current buffer event. An input buffer is a storage for data to read.

Note, there is also input property of EventBufferEvent class.

参数

此函数没有参数。

返回值

Returns instance of EventBuffer input buffer associated with current buffer event.

范例

Example #1 Buffer event's read callback

<?php
function readcb($bev$base) {
    
$input $bev->input//$bev->getInput();

    
while (($n $input->remove($buf1024)) > 0) {
        echo 
$buf;
    }
}
?>

参见

相关文章
php eventbufferevent closes file descriptor associated with the current buffer eventphp 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 drains the entire contents of the input buffer and places them into bufphp eventbufferevent returns most recent openssl error reported on the buffer eventphp eventbufferevent returns version of cipher used by current ssl connectionphp eventbufferevent returns the name of the protocol used for current ssl connectionphp 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 eventhttprequest returns the input bufferphp eventlistener returns event base associated with the event listenerphp evloop creates evcheck object associated with the current event loop instancephp evloop returns the current event loop time php evloop creates evperiodic watcher object associated with the current event loop instancephp evloop creates evprepare watcher object associated with the current event loop instancephp splobjectstorage returns the data associated with the current iterator entry
关注编程学问公众号